@Immutable public class Algorithm extends Object implements net.minidev.json.JSONAware, Serializable
Includes constants for the following standard algorithm names:
| Modifier and Type | Field and Description |
|---|---|
static Algorithm |
NONE
No algorithm (unsecured JOSE object without signature / encryption).
|
| Constructor and Description |
|---|
Algorithm(String name)
Creates a new JOSE algorithm name.
|
Algorithm(String name,
Requirement req)
Creates a new JOSE algorithm name.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object)
Overrides
Object.equals(). |
String |
getName()
Gets the name of this algorithm.
|
Requirement |
getRequirement()
Gets the implementation requirement of this algorithm.
|
int |
hashCode()
Overrides
Object.hashCode(). |
String |
toJSONString()
Returns the JSON string representation of this algorithm.
|
String |
toString()
Returns the string representation of this algorithm.
|
public Algorithm(String name, Requirement req)
name - The algorithm name. Must not be null.req - The implementation requirement, null if not
known.public final Requirement getRequirement()
null if not known.public final int hashCode()
Object.hashCode().public final String toJSONString()
toJSONString in interface net.minidev.json.JSONAwareCopyright © 2018 Connect2id Ltd.. All rights reserved.