Class AbstractSymmetricEncryptionConfig<T extends AbstractSymmetricEncryptionConfig>

  • Type Parameters:
    T - the type of the configuration class
    Direct Known Subclasses:
    EncryptionAtRestConfig, SymmetricEncryptionConfig

    public abstract class AbstractSymmetricEncryptionConfig<T extends AbstractSymmetricEncryptionConfig>
    extends java.lang.Object
    Base class for symmetric encryption configuration classes.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAlgorithm()
      Returns the encryption algorithm.
      java.lang.String getSalt()
      Returns the salt.
      boolean isEnabled()
      Returns if this configuration is enabled.
      T setAlgorithm​(java.lang.String algorithm)
      Sets the encryption algorithm, such as AES/CBC/PKCS5Padding.
      T setEnabled​(boolean enabled)
      Enables and disables this configuration.
      T setSalt​(java.lang.String salt)
      Sets the salt used for encryption.
      • Methods inherited from class java.lang.Object

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

      • DEFAULT_SYMMETRIC_ALGORITHM

        public static final java.lang.String DEFAULT_SYMMETRIC_ALGORITHM
        Default symmetric encryption algorithm.
        See Also:
        Constant Field Values
      • DEFAULT_SYMMETRIC_SALT

        public static final java.lang.String DEFAULT_SYMMETRIC_SALT
        Default symmetric encryption salt.
        See Also:
        Constant Field Values
    • Constructor Detail

      • AbstractSymmetricEncryptionConfig

        public AbstractSymmetricEncryptionConfig()
    • Method Detail

      • isEnabled

        public boolean isEnabled()
        Returns if this configuration is enabled.
        Returns:
        true if enabled, false otherwise
      • setEnabled

        public T setEnabled​(boolean enabled)
        Enables and disables this configuration.
        Parameters:
        enabled - true to enable, false to disable
      • getAlgorithm

        public java.lang.String getAlgorithm()
        Returns the encryption algorithm.
        Returns:
        the encryption algorithm
      • setAlgorithm

        public T setAlgorithm​(java.lang.String algorithm)
        Sets the encryption algorithm, such as AES/CBC/PKCS5Padding.
        Parameters:
        algorithm - the encryption algorithm
      • getSalt

        public java.lang.String getSalt()
        Returns the salt.
        Returns:
        the salt
      • setSalt

        public T setSalt​(java.lang.String salt)
        Sets the salt used for encryption.
        Parameters:
        salt - the salt