|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.nimbusds.jose.jwk.KeyType
@Immutable public final class KeyType
Key type. Used to represent the kty
parameter in a JSON Web Key
(JWK). This class is immutable.
Includes constants for the following standard key types:
Additional key types can be defined using the constructor.
Field Summary | |
---|---|
static KeyType |
EC
Elliptic Curve (DSS) key type (recommended). |
static KeyType |
OCT
Octet sequence key type (optional) |
static KeyType |
RSA
RSA (RFC 3447) key type (required). |
Constructor Summary | |
---|---|
KeyType(String value,
Requirement req)
Creates a new key type with the specified value and implementation requirement. |
Method Summary | |
---|---|
boolean |
equals(Object object)
Overrides Object.equals() . |
Requirement |
getRequirement()
Gets the implementation requirement of this key type. |
String |
getValue()
Gets the value of this key type. |
int |
hashCode()
Overrides Object.hashCode() . |
static KeyType |
parse(String s)
Parses a key type from the specified string. |
String |
toJSONString()
Returns the JSON string representation of this key type. |
String |
toString()
Returns the string representation of this key type. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final KeyType EC
public static final KeyType RSA
public static final KeyType OCT
Constructor Detail |
---|
public KeyType(String value, Requirement req)
value
- The key type value. Values are case sensitive. Must not
be null
.req
- The implementation requirement, null
if not
known.Method Detail |
---|
public String getValue()
public Requirement getRequirement()
null
if not known.public int hashCode()
Object.hashCode()
.
hashCode
in class Object
public boolean equals(Object object)
Object.equals()
.
equals
in class Object
object
- The object to compare to.
true
if the objects have the same value, otherwise
false
.public String toString()
toString
in class Object
getValue()
public String toJSONString()
toJSONString
in interface net.minidev.json.JSONAware
public static KeyType parse(String s)
s
- The string to parse. Must not be null
.
ParseException
- If the string couldn't be parsed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |