public final class JwtKeyConverter extends Object
These functions are currently just an example, and are not (yet) part of the public API.
| Modifier and Type | Method and Description |
|---|---|
static com.google.crypto.tink.jwt.JwtEcdsaPublicKey |
fromBase64EncodedNistP256PublicKey(String based64EncodedEcNistP256PublicKey)
Converts an uncompressed Base64 encoded ECDSA public key for NIST P-256 Curve into a Tink
JwtEcdsaPublicKey with algorithm ES256.
|
static com.google.crypto.tink.jwt.JwtEcdsaPrivateKey |
fromBased64EncodedPkcs8EcNistP256PrivateKey(String based64EncodedPkcs8EcNistP256PrivateKey,
com.google.crypto.tink.jwt.JwtEcdsaPublicKey publicKey,
com.google.crypto.tink.SecretKeyAccess access)
Converts a Base64 encoded PKCS8 ECDSA private key for NIST P-256 Curve into a Tink
JwtEcdsaPrivateKey with algorithm ES256.
|
static String |
toBase64EncodedNistP256PublicKey(com.google.crypto.tink.jwt.JwtEcdsaPublicKey publicKey)
Converts a JwtEcdsaPublicKey using algorithm ES256 to an uncompressed Base64 encoded ECDSA
public key for NIST P-256 Curve.
|
public static com.google.crypto.tink.jwt.JwtEcdsaPublicKey fromBase64EncodedNistP256PublicKey(String based64EncodedEcNistP256PublicKey) throws GeneralSecurityException
GeneralSecurityExceptionpublic static String toBase64EncodedNistP256PublicKey(com.google.crypto.tink.jwt.JwtEcdsaPublicKey publicKey) throws GeneralSecurityException
GeneralSecurityExceptionpublic static com.google.crypto.tink.jwt.JwtEcdsaPrivateKey fromBased64EncodedPkcs8EcNistP256PrivateKey(String based64EncodedPkcs8EcNistP256PrivateKey, com.google.crypto.tink.jwt.JwtEcdsaPublicKey publicKey, com.google.crypto.tink.SecretKeyAccess access) throws GeneralSecurityException
It also requires that you provide the corresponding JwtEcdsaPublicKey.
GeneralSecurityException