Class EncryptionManagerImpl

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

    public class EncryptionManagerImpl
    extends java.lang.Object
    implements step.core.encryption.EncryptionManager
    • Constructor Summary

      Constructors 
      Constructor Description
      EncryptionManagerImpl​(java.io.File keyPairPath, java.util.function.Supplier<java.lang.String> keyPairValidationStringSupplier, java.util.function.Consumer<java.lang.String> keyPairValidationStringPersister)  
      EncryptionManagerImpl​(java.io.File keyPairPath, java.util.function.Supplier<java.lang.String> keyPairValidationStringSupplier, java.util.function.Consumer<java.lang.String> keyPairValidationStringPersister, boolean ignoreKeyPairChange)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String decrypt​(java.lang.String encryptedValue)  
      java.lang.String encrypt​(java.lang.String value)  
      boolean isFirstStart()  
      boolean isKeyPairChanged()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EncryptionManagerImpl

        public EncryptionManagerImpl​(java.io.File keyPairPath,
                                     java.util.function.Supplier<java.lang.String> keyPairValidationStringSupplier,
                                     java.util.function.Consumer<java.lang.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​(java.io.File keyPairPath,
                                     java.util.function.Supplier<java.lang.String> keyPairValidationStringSupplier,
                                     java.util.function.Consumer<java.lang.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 java.lang.String encrypt​(java.lang.String value)
                                 throws step.core.encryption.EncryptionManagerException
        Specified by:
        encrypt in interface step.core.encryption.EncryptionManager
        Throws:
        step.core.encryption.EncryptionManagerException
      • decrypt

        public java.lang.String decrypt​(java.lang.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