Top Description Fields Constructors Methods
org.bouncycastle.crypto.internal.wrappers

public final Class SP80038FWrapWithPaddingEngine

extends SP80038FWrapper
Class Inheritance
Imports
org.bouncycastle.crypto.internal.BlockCipher, .InvalidCipherTextException, org.bouncycastle.util.Arrays, .Pack

an implementation of the AES Key Wrapper from the NIST Key Wrap Specification as described in RFC 3394/SP800-38F.

For further details see: http://www.ietf.org/rfc/rfc3394.txt and http://csrc.nist.gov/encryption/kms/key-wrap.pdf.

Field Summary

Inherited from org.bouncycastle.crypto.internal.wrappers.SP80038FWrapper:
deltaengineforWrappingivivKWivKWPparamwrapCipherMode

Constructor Summary

AccessConstructor and Description
public
SP80038FWrapWithPaddingEngine(BlockCipher
the block cipher to be used for wrapping.
engine
,
boolean
true if engine should be used in decryption mode for wrapping, false otherwise.
useReverseDirection
)

Create a RFC 3394 WrapEngine specifying the direction for wrapping and unwrapping..

Method Summary

Modifier and TypeMethod and Description
public String
getAlgorithmName()

Implements org.bouncycastle.crypto.internal.Wrapper.getAlgorithmName.

Return the name of the algorithm the wrapper implements.
public byte[]
unwrap(byte[] in, int inOff, int inLen)

Implements org.bouncycastle.crypto.internal.Wrapper.unwrap.

public byte[]
wrap(byte[] in, int inOff, int inLen)

Implements org.bouncycastle.crypto.internal.Wrapper.wrap.

Inherited from org.bouncycastle.crypto.internal.wrappers.SP80038FWrapper:
initinvWW

Constructor Detail

SP80038FWrapWithPaddingEngineback to summary
public SP80038FWrapWithPaddingEngine(BlockCipher engine, boolean useReverseDirection)

Create a RFC 3394 WrapEngine specifying the direction for wrapping and unwrapping..

Parameters
engine:BlockCipher

the block cipher to be used for wrapping.

useReverseDirection:boolean

true if engine should be used in decryption mode for wrapping, false otherwise.

Method Detail

getAlgorithmNameback to summary
public String getAlgorithmName()

Implements org.bouncycastle.crypto.internal.Wrapper.getAlgorithmName.

Doc from org.bouncycastle.crypto.internal.Wrapper.getAlgorithmName.

Return the name of the algorithm the wrapper implements.

Returns:String

the name of the algorithm the wrapper implements.

unwrapback to summary
public byte[] unwrap(byte[] in, int inOff, int inLen) throws InvalidCipherTextException

Implements org.bouncycastle.crypto.internal.Wrapper.unwrap.

wrapback to summary
public byte[] wrap(byte[] in, int inOff, int inLen)

Implements org.bouncycastle.crypto.internal.Wrapper.wrap.