public class DESedeKWProxyCipher extends CipherSpi
| Modifier and Type | Field and Description |
|---|---|
protected ByteArrayOutputStream |
buffer_
The buffer for the
engineUpdate
methods. |
protected Cipher |
cipher1_
The first cipher.
|
protected Cipher |
cipher2_
The second cipher.
|
int |
CKS_LENGTH
The length of the CMS checksum value as defined in RFC3217: Triple-DES and RC2 Key
Wrapping.
|
static byte[] |
CMS_KEY_WRAP_IV
The IV for the last encryption step of CMS key wrap.
|
protected Key |
key_
The key.
|
protected int |
opmode_
The mode of operation.
|
protected SecureRandom |
secureRandom_
The secure random.
|
| Constructor and Description |
|---|
DESedeKWProxyCipher()
Creates a new instance of this
DESedeKWProxyCipher. |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
engineDoFinal(byte[] input,
int inputOffset,
int inputLen) |
protected int |
engineDoFinal(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset) |
protected int |
engineGetBlockSize() |
protected byte[] |
engineGetIV() |
protected int |
engineGetKeySize(Key key) |
protected int |
engineGetOutputSize(int inputLen) |
protected AlgorithmParameters |
engineGetParameters() |
protected void |
engineInit(int opmode,
Key key,
AlgorithmParameterSpec params,
SecureRandom random) |
protected void |
engineInit(int opmode,
Key key,
AlgorithmParameters params,
SecureRandom random) |
protected void |
engineInit(int opmode,
Key key,
SecureRandom random) |
protected void |
engineSetMode(String mode) |
protected void |
engineSetPadding(String padding) |
protected Key |
engineUnwrap(byte[] wrappedKey,
String wrappedKeyAlgorithm,
int wrappedKeyType) |
protected byte[] |
engineUpdate(byte[] input,
int inputOffset,
int inputLen) |
protected int |
engineUpdate(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset) |
protected byte[] |
engineWrap(Key key) |
protected void |
getInstance(XSecProvider.Purpose purpose) |
protected void |
getInstanceUncaught(XSecProvider.Purpose purpose) |
engineDoFinal, engineUpdate, engineUpdateAAD, engineUpdateAADpublic static final byte[] CMS_KEY_WRAP_IV
IV = 0x4adda22c79e82105.
public final int CKS_LENGTH
protected ByteArrayOutputStream buffer_
engineUpdate
methods.protected Cipher cipher1_
protected Cipher cipher2_
protected SecureRandom secureRandom_
protected int opmode_
protected Key key_
public DESedeKWProxyCipher()
throws NoSuchAlgorithmException,
NoSuchProviderException,
NoSuchPaddingException
DESedeKWProxyCipher.protected void getInstanceUncaught(XSecProvider.Purpose purpose) throws NoSuchAlgorithmException, NoSuchProviderException, NoSuchPaddingException
protected void getInstance(XSecProvider.Purpose purpose)
protected void engineInit(int opmode,
Key key,
AlgorithmParameters params,
SecureRandom random)
throws InvalidKeyException,
InvalidAlgorithmParameterException
engineInit in class CipherSpiInvalidKeyExceptionInvalidAlgorithmParameterExceptionCipherSpi.engineInit(int, java.security.Key,
java.security.AlgorithmParameters, java.security.SecureRandom)protected void engineInit(int opmode,
Key key,
AlgorithmParameterSpec params,
SecureRandom random)
throws InvalidKeyException,
InvalidAlgorithmParameterException
protected void engineInit(int opmode,
Key key,
SecureRandom random)
throws InvalidKeyException
engineInit in class CipherSpiInvalidKeyExceptionCipherSpi.engineInit(int, java.security.Key,
java.security.SecureRandom)protected Key engineUnwrap(byte[] wrappedKey, String wrappedKeyAlgorithm, int wrappedKeyType) throws InvalidKeyException, NoSuchAlgorithmException
engineUnwrap in class CipherSpiInvalidKeyExceptionNoSuchAlgorithmExceptionCipherSpi.engineUnwrap(byte[], java.lang.String, int)protected byte[] engineWrap(Key key) throws IllegalBlockSizeException, InvalidKeyException
engineWrap in class CipherSpiIllegalBlockSizeExceptionInvalidKeyExceptionCipherSpi.engineWrap(java.security.Key)protected int engineDoFinal(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
throws ShortBufferException,
IllegalBlockSizeException,
BadPaddingException
engineDoFinal in class CipherSpiShortBufferExceptionIllegalBlockSizeExceptionBadPaddingExceptionCipherSpi.engineDoFinal(byte[], int, int, byte[], int)protected byte[] engineDoFinal(byte[] input,
int inputOffset,
int inputLen)
throws IllegalBlockSizeException,
BadPaddingException
engineDoFinal in class CipherSpiIllegalBlockSizeExceptionBadPaddingExceptionCipherSpi.engineDoFinal(byte[], int, int)protected void engineSetMode(String mode) throws NoSuchAlgorithmException
engineSetMode in class CipherSpiNoSuchAlgorithmExceptionCipherSpi.engineSetMode(java.lang.String)protected void engineSetPadding(String padding) throws NoSuchPaddingException
engineSetPadding in class CipherSpiNoSuchPaddingExceptionCipherSpi.engineSetPadding(java.lang.String)protected int engineGetBlockSize()
engineGetBlockSize in class CipherSpiCipherSpi.engineGetBlockSize()protected int engineGetOutputSize(int inputLen)
engineGetOutputSize in class CipherSpiCipherSpi.engineGetOutputSize(int)protected byte[] engineGetIV()
engineGetIV in class CipherSpiCipherSpi.engineGetIV()protected AlgorithmParameters engineGetParameters()
engineGetParameters in class CipherSpiCipherSpi.engineGetParameters()protected byte[] engineUpdate(byte[] input,
int inputOffset,
int inputLen)
engineUpdate in class CipherSpiCipherSpi.engineUpdate(byte[], int, int)protected int engineUpdate(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
throws ShortBufferException
engineUpdate in class CipherSpiShortBufferExceptionCipherSpi.engineUpdate(byte[], int, int, byte[], int)protected int engineGetKeySize(Key key) throws InvalidKeyException
engineGetKeySize in class CipherSpiInvalidKeyExceptionCipherSpi.engineGetKeySize(java.security.Key)© 2002-2005 IAIK, © 2004, 2006 - 2019 Stiftung SIC