Save This Page
Home » openjdk-7 » com.sun.crypto » provider » [javadoc | source]
com.sun.crypto.provider
public final class: AESWrapCipher [javadoc | source]
java.lang.Object
   javax.crypto.CipherSpi
      com.sun.crypto.provider.AESWrapCipher
This class implements the AES KeyWrap algorithm as defined in "XML Encryption Syntax and Processing" section 5.6.3 "AES Key Wrap". Note: only ECB mode and NoPadding padding can be used for this algorithm.
Constructor:
 public AESWrapCipher() 
Method from com.sun.crypto.provider.AESWrapCipher Summary:
engineDoFinal,   engineDoFinal,   engineGetBlockSize,   engineGetIV,   engineGetKeySize,   engineGetOutputSize,   engineGetParameters,   engineInit,   engineInit,   engineInit,   engineSetMode,   engineSetPadding,   engineUnwrap,   engineUpdate,   engineUpdate,   engineWrap
Methods from javax.crypto.CipherSpi:
a,   engineDoFinal,   engineDoFinal,   engineDoFinal,   engineGetBlockSize,   engineGetIV,   engineGetKeySize,   engineGetOutputSize,   engineGetParameters,   engineInit,   engineInit,   engineInit,   engineSetMode,   engineSetPadding,   engineUnwrap,   engineUpdate,   engineUpdate,   engineUpdate,   engineWrap
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.crypto.provider.AESWrapCipher Detail:
 protected byte[] engineDoFinal(byte[] input,
    int inputOffset,
    int inputLen) throws IllegalBlockSizeException, BadPaddingException 
    This operation is not supported by this cipher. Since it's impossible to initialize this cipher given the current Cipher.engineInit(...) implementation, IllegalStateException will always be thrown upon invocation.
 protected int engineDoFinal(byte[] in,
    int inOffset,
    int inLen,
    byte[] out,
    int outOffset) throws IllegalBlockSizeException, ShortBufferException, BadPaddingException 
    This operation is not supported by this cipher. Since it's impossible to initialize this cipher given the current Cipher.engineInit(...) implementation, IllegalStateException will always be thrown upon invocation.
 protected int engineGetBlockSize() 
    Returns the block size (in bytes). i.e. 16 bytes.
 protected byte[] engineGetIV() 
    Returns the initialization vector (IV) which is null for this cipher.
 protected int engineGetKeySize(Key key) throws InvalidKeyException 
    Returns the key size of the given key object in number of bits.
 protected int engineGetOutputSize(int inputLen) 
    Returns the length in bytes that an output buffer would need to be given the input length inputLen (in bytes).

    The actual output length of the next update or doFinal call may be smaller than the length returned by this method.

 protected AlgorithmParameters engineGetParameters() 
    Returns the parameters used with this cipher which is always null for this cipher.
 protected  void engineInit(int opmode,
    Key key,
    SecureRandom random) throws InvalidKeyException 
    Initializes this cipher with a key and a source of randomness.

    The cipher only supports the following two operation modes: Cipher.WRAP_MODE, and Cipher.UNWRAP_MODE.

    For modes other than the above two, UnsupportedOperationException will be thrown.

 protected  void engineInit(int opmode,
    Key key,
    AlgorithmParameterSpec params,
    SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException 
    Initializes this cipher with a key, a set of algorithm parameters, and a source of randomness.

    The cipher only supports the following two operation modes: Cipher.WRAP_MODE, and Cipher.UNWRAP_MODE.

    For modes other than the above two, UnsupportedOperationException will be thrown.

 protected  void engineInit(int opmode,
    Key key,
    AlgorithmParameters params,
    SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException 
    Initializes this cipher with a key, a set of algorithm parameters, and a source of randomness.

    The cipher only supports the following two operation modes: Cipher.WRAP_MODE, and Cipher.UNWRAP_MODE.

    For modes other than the above two, UnsupportedOperationException will be thrown.

 protected  void engineSetMode(String mode) throws NoSuchAlgorithmException 
    Sets the mode of this cipher. Only "ECB" mode is accepted for this cipher.
 protected  void engineSetPadding(String padding) throws NoSuchPaddingException 
    Sets the padding mechanism of this cipher. Only "NoPadding" schmem is accepted for this cipher.
 protected Key engineUnwrap(byte[] wrappedKey,
    String wrappedKeyAlgorithm,
    int wrappedKeyType) throws InvalidKeyException, NoSuchAlgorithmException 
    Unwrap a previously wrapped key.
 protected byte[] engineUpdate(byte[] in,
    int inOffset,
    int inLen) 
    This operation is not supported by this cipher. Since it's impossible to initialize this cipher given the current Cipher.engineInit(...) implementation, IllegalStateException will always be thrown upon invocation.
 protected int engineUpdate(byte[] in,
    int inOffset,
    int inLen,
    byte[] out,
    int outOffset) throws ShortBufferException 
    This operation is not supported by this cipher. Since it's impossible to initialize this cipher given the current Cipher.engineInit(...) implementation, IllegalStateException will always be thrown upon invocation.
 protected byte[] engineWrap(Key key) throws IllegalBlockSizeException, InvalidKeyException 
    Wrap a key.