Package com.google.crypto.tink.jwt
Class JwkSetConverter
- java.lang.Object
-
- com.google.crypto.tink.jwt.JwkSetConverter
-
public final class JwkSetConverter extends java.lang.ObjectProvides functions to import and export public Json Web Key (JWK) sets.The currently supported algorithms are ES256, ES384, ES512, RS256, RS384, RS512, PS256, PS384 and PS512.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.StringfromKeysetHandle(KeysetHandle handle, KeyAccess keyAccess)Deprecated.Use JwkSetConverter.fromPublicKeysetHandle(handle) instead.static java.lang.StringfromPublicKeysetHandle(KeysetHandle handle)Converts a Tink KeysetHandle with JWT public keys into a Json Web Key (JWK) set.static KeysetHandletoKeysetHandle(java.lang.String jwkSet, KeyAccess keyAccess)Deprecated.Use JwkSetConverter.toPublicKeysetHandle(jwkSet) instead.static KeysetHandletoPublicKeysetHandle(java.lang.String jwkSet)Converts a Json Web Key (JWK) set with public keys into a Tink KeysetHandle.
-
-
-
Method Detail
-
fromPublicKeysetHandle
public static java.lang.String fromPublicKeysetHandle(KeysetHandle handle) throws java.io.IOException, java.security.GeneralSecurityException
Converts a Tink KeysetHandle with JWT public keys into a Json Web Key (JWK) 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.
- Throws:
java.io.IOExceptionjava.security.GeneralSecurityException
-
toPublicKeysetHandle
public static KeysetHandle toPublicKeysetHandle(java.lang.String jwkSet) throws java.io.IOException, java.security.GeneralSecurityException
Converts a Json Web Key (JWK) set with public keys into a Tink KeysetHandle.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.
- Throws:
java.io.IOExceptionjava.security.GeneralSecurityException
-
fromKeysetHandle
@InlineMe(replacement="JwkSetConverter.fromPublicKeysetHandle(handle)", imports="com.google.crypto.tink.jwt.JwkSetConverter") @Deprecated public static java.lang.String fromKeysetHandle(KeysetHandle handle, KeyAccess keyAccess) throws java.io.IOException, java.security.GeneralSecurityExceptionDeprecated.Use JwkSetConverter.fromPublicKeysetHandle(handle) instead.- Throws:
java.io.IOExceptionjava.security.GeneralSecurityException
-
toKeysetHandle
@InlineMe(replacement="JwkSetConverter.toPublicKeysetHandle(jwkSet)", imports="com.google.crypto.tink.jwt.JwkSetConverter") @Deprecated public static KeysetHandle toKeysetHandle(java.lang.String jwkSet, KeyAccess keyAccess) throws java.io.IOException, java.security.GeneralSecurityExceptionDeprecated.Use JwkSetConverter.toPublicKeysetHandle(jwkSet) instead.- Throws:
java.io.IOExceptionjava.security.GeneralSecurityException
-
-