Package com.nimbusds.jose.jwk
Class ThumbprintUtils
- java.lang.Object
-
- com.nimbusds.jose.jwk.ThumbprintUtils
-
public final class ThumbprintUtils extends Object
Thumbprint utilities.See RFC 7638.
- Version:
- 2016-07-26
- Author:
- Vladimir Dzhuvinov
-
-
Constructor Summary
Constructors Constructor Description ThumbprintUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Base64URL
compute(JWK jwk)
Computes the SHA-256 thumbprint for the specified JWK.static Base64URL
compute(String hashAlg, JWK jwk)
Computes the thumbprint for the specified JWK.static Base64URL
compute(String hashAlg, LinkedHashMap<String,?> params)
Computes the thumbprint for the specified required JWK parameters.
-
-
-
Constructor Detail
-
ThumbprintUtils
public ThumbprintUtils()
-
-
Method Detail
-
compute
public static Base64URL compute(JWK jwk) throws JOSEException
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
public static Base64URL compute(String hashAlg, JWK jwk) throws JOSEException
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 JOSEException
Computes 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.
-
-