Package org.bouncycastle.crypto.engines
Class RC2WrapEngine
java.lang.Object
org.bouncycastle.crypto.engines.RC2WrapEngine
- All Implemented Interfaces:
Wrapper
Wrap keys according to RFC 3217 - RC2 mechanism
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionMethod getAlgorithmNamevoid
init
(boolean forWrapping, CipherParameters param) Method initbyte[]
unwrap
(byte[] in, int inOff, int inLen) Method unwrapbyte[]
wrap
(byte[] in, int inOff, int inLen) Method wrap
-
Constructor Details
-
Method Details
-
init
Method init -
getAlgorithmName
Method getAlgorithmName- Specified by:
getAlgorithmName
in interfaceWrapper
- Returns:
- the algorithm name "RC2".
-
wrap
public byte[] wrap(byte[] in, int inOff, int inLen) Method wrap -
unwrap
Method unwrap- Specified by:
unwrap
in interfaceWrapper
- Parameters:
in
- byte array containing the wrapped key.inOff
- offset into in array that the wrapped key starts at.inLen
- length of wrapped key data.- Returns:
- the unwrapped bytes.
- Throws:
InvalidCipherTextException
-