org.bouncycastle.crypto.engines

Class RC2WrapEngine

Implemented Interfaces:
Wrapper

public class RC2WrapEngine
extends java.lang.Object
implements Wrapper

Wrap keys according to RFC 3217 - RC2 mechanism

Method Summary

String
getAlgorithmName()
Method getAlgorithmName
void
init(boolean forWrapping, CipherParameters param)
Method init
byte[]
unwrap(byte[] in, int inOff, int inLen)
Method unwrap
byte[]
wrap(byte[] in, int inOff, int inLen)
Method wrap

Method Details

getAlgorithmName

public String getAlgorithmName()
Method getAlgorithmName
Specified by:
getAlgorithmName in interface Wrapper
Returns:
the algorithm name "RC2".

init

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

unwrap

public byte[] unwrap(byte[] in,
                     int inOff,
                     int inLen)
            throws InvalidCipherTextException
Method unwrap
Specified by:
unwrap in interface Wrapper
Parameters:
in -
inOff -
inLen -
Returns:
the unwrapped bytes.

wrap

public byte[] wrap(byte[] in,
                   int inOff,
                   int inLen)
Method wrap
Specified by:
wrap in interface Wrapper
Parameters:
in -
inOff -
inLen -
Returns:
the wrapped bytes.