public final class JwkSetConverter extends Object
The currently supported algorithms are ES256, ES384, ES512, RS256, RS384, RS512, PS256, PS384 and PS512.
| Modifier and Type | Method and Description |
|---|---|
static String |
fromKeysetHandle(KeysetHandle handle,
KeyAccess keyAccess)
Deprecated.
Use JwkSetConverter.fromPublicKeysetHandle(handle) instead.
|
static String |
fromPublicKeysetHandle(KeysetHandle handle)
Converts a Tink KeysetHandle with JWT public keys into a Json Web Key (JWK) set.
|
static KeysetHandle |
toKeysetHandle(String jwkSet,
KeyAccess keyAccess)
Deprecated.
Use JwkSetConverter.toPublicKeysetHandle(jwkSet) instead.
|
static KeysetHandle |
toPublicKeysetHandle(String jwkSet)
Converts a Json Web Key (JWK) set with public keys into a Tink KeysetHandle.
|
public static String fromPublicKeysetHandle(KeysetHandle handle) throws IOException, GeneralSecurityException
The currently supported algorithms are ES256, ES384, ES512, RS256, RS384, RS512, PS256, PS384 and PS512. JWK is defined in https://www.rfc-editor.org/rfc/rfc7517.txt.
IOExceptionGeneralSecurityExceptionpublic static KeysetHandle toPublicKeysetHandle(String jwkSet) throws IOException, GeneralSecurityException
It requires that all keys in the set have the "alg" field set. The currently supported algorithms are ES256, ES384, ES512, RS256, RS384, RS512, PS256, PS384 and PS512. JWK is defined in https://www.rfc-editor.org/rfc/rfc7517.txt.
IOExceptionGeneralSecurityException@InlineMe(replacement="JwkSetConverter.fromPublicKeysetHandle(handle)",
imports="com.google.crypto.tink.jwt.JwkSetConverter")
@Deprecated
public static String fromKeysetHandle(KeysetHandle handle,
KeyAccess keyAccess)
throws IOException,
GeneralSecurityException
IOExceptionGeneralSecurityException@InlineMe(replacement="JwkSetConverter.toPublicKeysetHandle(jwkSet)",
imports="com.google.crypto.tink.jwt.JwkSetConverter")
@Deprecated
public static KeysetHandle toKeysetHandle(String jwkSet,
KeyAccess keyAccess)
throws IOException,
GeneralSecurityException
IOExceptionGeneralSecurityException