Package com.nimbusds.jose.jwk
Class ThumbprintUtils
java.lang.Object
com.nimbusds.jose.jwk.ThumbprintUtils
Thumbprint utilities.
See RFC 7638.
- Version:
- 2016-07-26
- Author:
- Vladimir Dzhuvinov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Base64URLComputes the SHA-256 thumbprint for the specified JWK.static Base64URLComputes the thumbprint for the specified JWK.static Base64URLcompute(String hashAlg, LinkedHashMap<String, ?> params) Computes the thumbprint for the specified required JWK parameters.
-
Constructor Details
-
ThumbprintUtils
public ThumbprintUtils()
-
-
Method Details
-
compute
Computes the SHA-256 thumbprint for the specified JWK.- Parameters:
jwk- The JWK. Must not benull.- Returns:
- The JWK thumbprint.
- Throws:
JOSEException- If the SHA-256 hash algorithm is not supported.
-
compute
Computes the thumbprint for the specified JWK.- Parameters:
hashAlg- The hash algorithm. Must not benull.jwk- The JWK. Must not benull.- Returns:
- The JWK thumbprint.
- Throws:
JOSEException- If the hash algorithm is not supported.
-
compute
public static Base64URL compute(String hashAlg, LinkedHashMap<String, ?> params) throws JOSEExceptionComputes the thumbprint for the specified required JWK parameters.- Parameters:
hashAlg- The hash algorithm. Must not benull.params- The required JWK parameters, alphanumerically sorted by parameter name and ready for JSON object serialisation. Must not benull.- Returns:
- The JWK thumbprint.
- Throws:
JOSEException- If the hash algorithm is not supported.
-