Class AESSecretKeyFactory


  • public class AESSecretKeyFactory
    extends javax.crypto.SecretKeyFactorySpi
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected javax.crypto.SecretKey engineGenerateSecret​(java.security.spec.KeySpec keySpec)  
      protected java.security.spec.KeySpec engineGetKeySpec​(javax.crypto.SecretKey key, java.lang.Class<?> keySpec)
      Returns a specification (key material) of the given key in the requested format.
      protected javax.crypto.SecretKey engineTranslateKey​(javax.crypto.SecretKey key)  
      • Methods inherited from class java.lang.Object

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

      • AESSecretKeyFactory

        public AESSecretKeyFactory()
    • Method Detail

      • engineGenerateSecret

        protected javax.crypto.SecretKey engineGenerateSecret​(java.security.spec.KeySpec keySpec)
                                                       throws java.security.spec.InvalidKeySpecException
        Specified by:
        engineGenerateSecret in class javax.crypto.SecretKeyFactorySpi
        Throws:
        java.security.spec.InvalidKeySpecException
      • engineGetKeySpec

        protected java.security.spec.KeySpec engineGetKeySpec​(javax.crypto.SecretKey key,
                                                              java.lang.Class<?> keySpec)
                                                       throws java.security.spec.InvalidKeySpecException
        Returns a specification (key material) of the given key in the requested format.
        Specified by:
        engineGetKeySpec in class javax.crypto.SecretKeyFactorySpi
        Parameters:
        key - the key
        keySpec - the requested format in which the key material shall be returned
        Returns:
        the underlying key specification (key material) in the requested format
        Throws:
        java.security.spec.InvalidKeySpecException - if the requested key specification is inappropriate for the given key, or the given key cannot be processed (e.g., the given key has an unrecognized algorithm or format).
      • engineTranslateKey

        protected javax.crypto.SecretKey engineTranslateKey​(javax.crypto.SecretKey key)
                                                     throws java.security.InvalidKeyException
        Specified by:
        engineTranslateKey in class javax.crypto.SecretKeyFactorySpi
        Throws:
        java.security.InvalidKeyException