java.lang.Object
com.aquima.interactions.foundation.security.core.CryptoFactory

public final class CryptoFactory extends Object
The crypto factory takes care of creaating encryptors and decryptors.
Since:
5.1
Author:
m.hesselink
  • Constructor Details

    • CryptoFactory

      public CryptoFactory(EnvelopeVersion version, CertificateSet certificateSet)
      Create a new crypto factory for a specific envelope version.
      Parameters:
      version - version of the envelope to encrypt
      certificateSet - certificateset containing at least a SecretCertificate
      Throws:
      CryptoGraphicException - This exception is thrown when an invalid version of certificate set is passed to the contructor.
  • Method Details

    • createEncryptor

      public IEncryptor createEncryptor()
      Create a new encryptor matching the envelope version.
      Returns:
      version specific encryptor
      Throws:
      CryptoGraphicException - This exception is thrown when the encryptor could not be created.
    • createDecryptor

      public IDecryptor createDecryptor()
      Create a decryptor matching the envelope version.
      Returns:
      version specific decryptor
      Throws:
      CryptoGraphicException - This exception is thrown when the decryptor could not be created.