org.bouncycastle.crypto.engines
Class RC2WrapEngine
java.lang.Object
org.bouncycastle.crypto.engines.RC2WrapEngine
- Wrapper
public class RC2WrapEngine
extends java.lang.Object
Wrap keys according to
draft-ietf-smime-key-wrap-01.txt.
Note:
- this is based on a draft, and as such is subject to change - don't use this class for anything requiring long term storage.
- if you are using this to wrap triple-des keys you need to set the
parity bits on the key and, if it's a two-key triple-des key, pad it
yourself.
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
|
getAlgorithmName
public String getAlgorithmName()
Method getAlgorithmName
- getAlgorithmName in interface Wrapper
- the algorithm name "RC2".
wrap
public byte[] wrap(byte[] in,
int inOff,
int inLen)
Method wrap
- wrap in interface Wrapper
in
- inOff
- inLen
-
- the wrapped bytes.