Save This Page
Home » openjdk-7 » com.sun.crypto » provider » [javadoc | source]
com.sun.crypto.provider
public final class: DESedeWrapCipher [javadoc | source]
java.lang.Object
   javax.crypto.CipherSpi
      com.sun.crypto.provider.DESedeWrapCipher
This class implements the CMS DESede KeyWrap algorithm as defined in "XML Encryption Syntax and Processing" section 5.6.2 "CMS Triple DES Key Wrap". Note: only CBC mode and NoPadding padding scheme can be used for this algorithm.
Constructor:
 public DESedeWrapCipher() 
Method from com.sun.crypto.provider.DESedeWrapCipher 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.DESedeWrapCipher Detail:
 protected byte[] engineDoFinal(byte[] in,
    int inOffset,
    int inLen) 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[] input,
    int inputOffset,
    int inputLen,
    byte[] output,
    int outputOffset) 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. 8 bytes.
 protected byte[] engineGetIV() 
    Returns the initialization vector (IV) in a new buffer.
 protected int engineGetKeySize(Key key) throws InvalidKeyException 
    Returns the key size of the given key object in number of bits. This cipher always return the same key size as the DESede ciphers.
 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. Note that null maybe returned if this cipher does not use any parameters or when it has not be set, e.g. initialized with UNWRAP_MODE but wrapped key data has not been given.
 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.

    If this cipher requires an initialization vector (IV), it will get it from random.

 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.

    If this cipher requires an initialization vector (IV), it will get it from random.

 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.

    If this cipher requires an initialization vector (IV), it will get it from random.

 protected  void engineSetMode(String mode) throws NoSuchAlgorithmException 
    Sets the mode of this cipher. Only "CBC" 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.