Class Encryptor

java.lang.Object
org.mozilla.jss.SecretDecoderRing.Encryptor

public class Encryptor extends Object
Encrypts data with the SecretDecoderRing.
  • Field Details

    • DEFAULT_ENCRYPTION_ALG

      public static final EncryptionAlgorithm DEFAULT_ENCRYPTION_ALG
      The default encryption algorithm, currently DES3_CBC.
  • Constructor Details

    • Encryptor

      public Encryptor(CryptoToken token, byte[] keyID, EncryptionAlgorithm alg) throws TokenException, InvalidKeyException
      Creates an Encryptor on the given CryptoToken, using the key with the given keyID and algorithm
      Parameters:
      token - The CryptoToken to use for encryption. The key must reside on this token.
      keyID - The keyID of the key to use for encryption. This key must have been generated on this token with KeyManager.
      alg - The EncryptionAlgorithm this key will be used for.
      Throws:
      InvalidKeyException - If no key exists on this token with this keyID.
      TokenException
  • Method Details