org.bouncycastle.crypto.engines

Class RFC3394WrapEngine

Implemented Interfaces:
Wrapper
Known Direct Subclasses:
AESWrapEngine, CamelliaWrapEngine, SEEDWrapEngine

public class RFC3394WrapEngine
extends java.lang.Object
implements Wrapper

an implementation of the AES Key Wrapper from the NIST Key Wrap Specification as described in RFC 3394.

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

Constructor Summary

RFC3394WrapEngine(BlockCipher engine)

Method Summary

String
getAlgorithmName()
Return the name of the algorithm the wrapper implements.
void
init(boolean forWrapping, CipherParameters param)
byte[]
unwrap(byte[] in, int inOff, int inLen)
byte[]
wrap(byte[] in, int inOff, int inLen)

Constructor Details

RFC3394WrapEngine

public RFC3394WrapEngine(BlockCipher engine)

Method Details

getAlgorithmName

public String getAlgorithmName()
Return the name of the algorithm the wrapper implements.
Specified by:
getAlgorithmName in interface Wrapper
Returns:
the name of the algorithm the wrapper implements.

init

public void init(boolean forWrapping,
                 CipherParameters param)
Specified by:
init in interface Wrapper

unwrap

public byte[] unwrap(byte[] in,
                     int inOff,
                     int inLen)
            throws InvalidCipherTextException
Specified by:
unwrap in interface Wrapper

wrap

public byte[] wrap(byte[] in,
                   int inOff,
                   int inLen)
Specified by:
wrap in interface Wrapper