Class EncryptionManagerImpl

  • All Implemented Interfaces:
    step.core.encryption.EncryptionManager

    public class EncryptionManagerImpl
    extends Object
    implements step.core.encryption.EncryptionManager
    • Constructor Detail

      • EncryptionManagerImpl

        public EncryptionManagerImpl​(File keyPairPath,
                                     Supplier<String> keyPairValidationStringSupplier,
                                     Consumer<String> keyPairValidationStringPersister)
                              throws step.core.encryption.EncryptionManagerException,
                                     step.core.encryption.UnknownKeyPairException,
                                     step.core.encryption.MissingKeyPairException
        Throws:
        step.core.encryption.EncryptionManagerException
        step.core.encryption.UnknownKeyPairException
        step.core.encryption.MissingKeyPairException
      • EncryptionManagerImpl

        public EncryptionManagerImpl​(File keyPairPath,
                                     Supplier<String> keyPairValidationStringSupplier,
                                     Consumer<String> keyPairValidationStringPersister,
                                     boolean ignoreKeyPairChange)
                              throws step.core.encryption.EncryptionManagerException,
                                     step.core.encryption.UnknownKeyPairException,
                                     step.core.encryption.MissingKeyPairException
        Throws:
        step.core.encryption.EncryptionManagerException
        step.core.encryption.UnknownKeyPairException
        step.core.encryption.MissingKeyPairException
    • Method Detail

      • encrypt

        public String encrypt​(String value)
                       throws step.core.encryption.EncryptionManagerException
        Specified by:
        encrypt in interface step.core.encryption.EncryptionManager
        Throws:
        step.core.encryption.EncryptionManagerException
      • decrypt

        public String decrypt​(String encryptedValue)
                       throws step.core.encryption.EncryptionManagerException
        Specified by:
        decrypt in interface step.core.encryption.EncryptionManager
        Throws:
        step.core.encryption.EncryptionManagerException
      • isKeyPairChanged

        public boolean isKeyPairChanged()
        Specified by:
        isKeyPairChanged in interface step.core.encryption.EncryptionManager
      • isFirstStart

        public boolean isFirstStart()
        Specified by:
        isFirstStart in interface step.core.encryption.EncryptionManager