@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 static final Algorithm NONE
public Algorithm(String name, Requirement req)
name
- The algorithm name. Must not be null
.req
- The implementation requirement, null
if not
known.public Algorithm(String name)
name
- The algorithm name. Must not be null
.public final String getName()
public final Requirement getRequirement()
null
if not known.public final int hashCode()
Object.hashCode()
.public boolean equals(Object object)
Object.equals()
.public final String toString()
public final String toJSONString()
toJSONString
in interface net.minidev.json.JSONAware
Copyright © 2018 Connect2id Ltd.. All rights reserved.