Class SimpleEncryptor

java.lang.Object
org.forgerock.json.crypto.simple.SimpleEncryptor
All Implemented Interfaces:
JsonEncryptor

public class SimpleEncryptor extends Object implements JsonEncryptor
Encrypts a JSON value into an x-simple-encryption type $crypto JSON object.
  • Field Details

    • TYPE

      public static final String TYPE
      The type of cryptographic representation that this encryptor supports.
      See Also:
  • Constructor Details

    • SimpleEncryptor

      public SimpleEncryptor(String cipher, Key key, String alias)
      Constructs a new simple encryptor for the specified cipher, key and alias.
      Parameters:
      cipher - the cipher to encrypt with.
      key - the key to encrypt with.
      alias - the key alias to list in the encrypted object.
    • SimpleEncryptor

      public SimpleEncryptor(String cipher, Key key, Purpose<? extends CryptoKey> purpose, String stableId)
      Constructor.
      Parameters:
      cipher - The cipher to encrypt with.
      key - The key to encrypt with.
      purpose - The key Purpose to lise in the encrypted object.
      stableId - The key id to list in the encrypted object.
  • Method Details