|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bouncycastle.crypto.engines.DESedeWrapEngine
public class DESedeWrapEngine
Wrap keys according to draft-ietf-smime-key-wrap-01.txt.
Note:
Field Summary | |
---|---|
(package private) byte[] |
digest
|
private CBCBlockCipher |
engine
Field engine |
private boolean |
forWrapping
Field forWrapping |
private byte[] |
iv
Field iv |
private static byte[] |
IV2
Field IV2 |
private KeyParameter |
param
Field param |
private ParametersWithIV |
paramPlusIV
Field paramPlusIV |
(package private) Digest |
sha1
|
Constructor Summary | |
---|---|
DESedeWrapEngine()
|
Method Summary | |
---|---|
private byte[] |
calculateCMSKeyChecksum(byte[] key)
Some key wrap algorithms make use of the Key Checksum defined in CMS [CMS-Algorithms]. |
private boolean |
checkCMSKeyChecksum(byte[] key,
byte[] checksum)
|
java.lang.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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private CBCBlockCipher engine
private KeyParameter param
private ParametersWithIV paramPlusIV
private byte[] iv
private boolean forWrapping
private static final byte[] IV2
Digest sha1
byte[] digest
Constructor Detail |
---|
public DESedeWrapEngine()
Method Detail |
---|
public void init(boolean forWrapping, CipherParameters param)
init
in interface Wrapper
forWrapping
- param
- public java.lang.String getAlgorithmName()
getAlgorithmName
in interface Wrapper
public byte[] wrap(byte[] in, int inOff, int inLen)
wrap
in interface Wrapper
in
- inOff
- inLen
-
public byte[] unwrap(byte[] in, int inOff, int inLen) throws InvalidCipherTextException
unwrap
in interface Wrapper
in
- inOff
- inLen
-
InvalidCipherTextException
private byte[] calculateCMSKeyChecksum(byte[] key)
key
-
java.lang.RuntimeException
http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum
private boolean checkCMSKeyChecksum(byte[] key, byte[] checksum)
key
- checksum
-
http://www.w3.org/TR/xmlenc-core/#sec-CMSKeyChecksum
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |