|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.bouncycastle.crypto.engines.RC2WrapEngine
public class RC2WrapEngine
Wrap keys according to RFC 3217 - RC2 mechanism
| 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 CipherParameters |
param
Field param |
private ParametersWithIV |
paramPlusIV
Field paramPlusIV |
(package private) Digest |
sha1
|
private java.security.SecureRandom |
sr
|
| Constructor Summary | |
|---|---|
RC2WrapEngine()
|
|
| 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 CipherParameters param
private ParametersWithIV paramPlusIV
private byte[] iv
private boolean forWrapping
private java.security.SecureRandom sr
private static final byte[] IV2
Digest sha1
byte[] digest
| Constructor Detail |
|---|
public RC2WrapEngine()
| Method Detail |
|---|
public void init(boolean forWrapping,
CipherParameters param)
init in interface WrapperforWrapping - param - public java.lang.String getAlgorithmName()
getAlgorithmName in interface Wrapper
public byte[] wrap(byte[] in,
int inOff,
int inLen)
wrap in interface Wrapperin - inOff - inLen -
public byte[] unwrap(byte[] in,
int inOff,
int inLen)
throws InvalidCipherTextException
unwrap in interface Wrapperin - inOff - inLen -
InvalidCipherTextExceptionprivate byte[] calculateCMSKeyChecksum(byte[] key)
key -
java.lang.RuntimeExceptionhttp://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 | ||||||||