Interface SymmetricJWK

All Superinterfaces:
JWK
All Known Subinterfaces:
OCTJWK, PBES2JWK

public interface SymmetricJWK extends JWK

A symmetric JSON Web Key based on a symmetric key.

Since:
1.5
Author:
Jeremy Kuhn
  • Method Details

    • toSecretKey

      Converts the JWK to its corresponding secret key.

      Returns:
      an optional containing the secret key or an empty optional if the key does not contain secret information
      Throws:
      JWKProcessingException - if there was an error converting the JWK to a secret key
    • toPublicJWK

      SymmetricJWK toPublicJWK()
      Description copied from interface: JWK

      Returns a public and safe to share representation of the key.

      Specified by:
      toPublicJWK in interface JWK
      Returns:
      a public representation of this JWK
    • trust

      SymmetricJWK trust()
      Description copied from interface: JWK

      Trusts the key explicitly.

      This should be used with care when the authenticity of an untrusted key has been established through external means.

      Specified by:
      trust in interface JWK
      Returns:
      this JWK