@Immutable public class Algorithm extends java.lang.Object implements net.minidev.json.JSONAware
Includes constants for the following standard algorithm names:
| Modifier and Type | Field and Description |
|---|---|
static Algorithm |
NONE
No algorithm (plain JOSE object without signature / encryption).
|
| Constructor and Description |
|---|
Algorithm(java.lang.String name)
Creates a new JOSE algorithm name.
|
Algorithm(java.lang.String name,
Requirement req)
Creates a new JOSE algorithm name.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object object)
Overrides
Object.equals(). |
java.lang.String |
getName()
Gets the name of this algorithm.
|
Requirement |
getRequirement()
Gets the implementation requirement of this algorithm.
|
int |
hashCode()
Overrides
Object.hashCode(). |
java.lang.String |
toJSONString()
Returns the JSON string representation of this algorithm.
|
java.lang.String |
toString()
Returns the string representation of this algorithm.
|
public Algorithm(java.lang.String name, Requirement req)
name - The algorithm name. Must not be null.req - The implementation requirement, null if not
known.public Algorithm(java.lang.String name)
name - The algorithm name. Must not be null.public final java.lang.String getName()
public final Requirement getRequirement()
null if not known.public final int hashCode()
Object.hashCode().hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object object)
Object.equals().equals in class java.lang.Objectobject - The object to compare to.true if the objects have the same value, otherwise
false.public final java.lang.String toString()
toString in class java.lang.ObjectgetName()public final java.lang.String toJSONString()
toJSONString in interface net.minidev.json.JSONAwareCopyright © 2013 NimbusDS. All Rights Reserved.