Modifier and Type | Field and Description |
---|---|
(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 and Description |
---|
RC2WrapEngine() |
Modifier and Type | Method and Description |
---|---|
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
|
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
public void init(boolean forWrapping, CipherParameters param)
public java.lang.String getAlgorithmName()
getAlgorithmName
in interface Wrapper
public byte[] wrap(byte[] in, int inOff, int 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