public abstract class HashClaim extends Identifier
DEFAULT_BYTE_LENGTH| Modifier | Constructor and Description |
|---|---|
protected |
HashClaim(java.lang.String value)
Creates a new SHA-2 based claim with the specified value.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
computeValue(Identifier identifier,
com.nimbusds.jose.JWSAlgorithm alg)
Computes the SHA-2 claim value for the specified identifier.
|
static java.security.MessageDigest |
getMessageDigestInstance(com.nimbusds.jose.JWSAlgorithm alg)
Gets the matching SHA-2 message digest for the specified JSON Web
Signature (JWS) algorithm.
|
compareTo, equals, getValue, hashCode, toJSONString, toStringprotected HashClaim(java.lang.String value)
value - The claim value. Must not be null.public static java.security.MessageDigest getMessageDigestInstance(com.nimbusds.jose.JWSAlgorithm alg)
alg - The JWS algorithm. Must not be null.null if the JWS algorithm
or its corresponding SHA-2 message digest are not supported.public static java.lang.String computeValue(Identifier identifier, com.nimbusds.jose.JWSAlgorithm alg)
identifier - The identifier, typically an authorisation code or
an access token. Must not be null.alg - The reference JSON Web Signature (JWS) algorithm.
Must not be null.null if the JWS algorithm or its corresponding
SHA-2 message digest are not supported.Copyright © 2014 Connect2id Ltd.. All Rights Reserved.