Package org.bouncycastle.crypto.engines
Class DESedeWrapEngine
java.lang.Object
org.bouncycastle.crypto.engines.DESedeWrapEngine
- All Implemented Interfaces:
Wrapper
Wrap keys according to
RFC 3217.
Note:
- 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.
-
Constructor Summary
Constructors -
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
-
DESedeWrapEngine
public DESedeWrapEngine()
-
-
Method Details
-
init
Method init -
getAlgorithmName
Method getAlgorithmName- Specified by:
getAlgorithmName
in interfaceWrapper
- Returns:
- the algorithm name "DESede".
-
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
- off set into in that the data starts at.inLen
- length of the data.- Returns:
- the unwrapped bytes.
- Throws:
InvalidCipherTextException
-