Class DefaultEncryptor

    • Constructor Detail

      • DefaultEncryptor

        public DefaultEncryptor()
        Default constructor for IOC
    • Method Detail

      • setCacheCiphers

        public void setCacheCiphers​(boolean cacheCiphers)
      • createCipher

        protected javax.crypto.Cipher createCipher​(int mode,
                                                   java.lang.String algorithm,
                                                   java.lang.String provider,
                                                   java.security.Key key,
                                                   java.security.AlgorithmParameters params)
                                            throws java.security.NoSuchAlgorithmException,
                                                   javax.crypto.NoSuchPaddingException,
                                                   java.security.NoSuchProviderException,
                                                   java.security.InvalidKeyException,
                                                   java.security.InvalidAlgorithmParameterException
        Throws:
        java.security.NoSuchAlgorithmException
        javax.crypto.NoSuchPaddingException
        java.security.NoSuchProviderException
        java.security.InvalidKeyException
        java.security.InvalidAlgorithmParameterException
      • getCachedCipher

        protected javax.crypto.Cipher getCachedCipher​(java.lang.String keyAlias,
                                                      int mode,
                                                      java.security.AlgorithmParameters params,
                                                      java.security.Key key)
                                               throws java.security.InvalidKeyException,
                                                      java.security.NoSuchAlgorithmException,
                                                      javax.crypto.NoSuchPaddingException,
                                                      java.security.NoSuchProviderException,
                                                      java.security.InvalidAlgorithmParameterException
        Throws:
        java.security.InvalidKeyException
        java.security.NoSuchAlgorithmException
        javax.crypto.NoSuchPaddingException
        java.security.NoSuchProviderException
        java.security.InvalidAlgorithmParameterException
      • getCipher

        public javax.crypto.Cipher getCipher​(java.lang.String keyAlias,
                                             java.security.AlgorithmParameters params,
                                             int mode)
        Description copied from class: AbstractEncryptor
        Factory method to be written by implementations to construct and initialize physical ciphering objects.
        Specified by:
        getCipher in class AbstractEncryptor
        Parameters:
        keyAlias - the key alias
        params - algorithm-specific parameters
        mode - the cipher mode
        Returns:
        Cipher
      • keyAvailable

        public boolean keyAvailable​(java.lang.String keyAlias)