public class AesCipher extends BlockCipher
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
CIPHER_NAME
The JCE name of this cipher.
|
protected static java.util.Hashtable |
cipherModePaddingMechansims_
The mapping from mode + "/" + padding to the cryptoki mechanism for DES.
|
protected static iaik.pkcs.pkcs11.Mechanism |
DEFAULT_MECHANISM
The defualt mechanism for this cipher.
|
protected static java.util.Vector |
supportedModes_
The supported modes of operation of this cipher.
|
DEFAULT_MODE, DEFAULT_PADDING, externalPadding_, externalPaddings_, ivParameterSpec_, ivParameterSpecChanged_, modePaddingMechanisms_, supportedPaddings_
currentKeyIsSoftwareKey_, DUMMY_DATA, initialized_, key_, keyObject_, mechanism_, mode_, modeChanged_, operationMode_, padding_, paddingChanged_, parameters_, parameterSpecs_, pkcs11OperationInitialized_, session_, softwareDelegate_, tokenManager_, unwrapTemplate_, updateUsed_, usedMechanismInfos_, usedMechanisms_
Constructor and Description |
---|
AesCipher()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkKeyObject(iaik.pkcs.pkcs11.objects.Key keyObject)
Check the given key object, if it is acceptable for this cipher.
|
protected java.lang.String |
getAlgorithmName()
Get the JCE name of this cipher algorithm.
|
protected iaik.pkcs.pkcs11.Mechanism |
getDefaultMechanism()
Get the default mechanism of this cipher.
|
protected java.util.Hashtable |
getModePaddingMechanisms()
Get the hashtable that maps from mode + "/" + padding to the cryptoki mechanism.
|
protected int |
getOutputSize(int inputLen)
Returns the length in bytes that an output buffer would need to be in order to hold the result
of the next update or doFinal operation, given the input length inputLen (in bytes).
|
protected iaik.pkcs.pkcs11.MechanismInfo[][] |
getUsedMechanismFeatures()
Returns a two-dimensional array of MechanismInfos that this engine class uses.
|
protected iaik.pkcs.pkcs11.Mechanism[] |
getUsedMechanisms()
Returns an array of Mechanisms that this engine class uses.
|
protected boolean |
isModeSupported(java.lang.String mode)
Check, if the given mode of operation is supported by this cipher.
|
protected int |
pkcs11GetBlockSize()
Get the block size of this cipher algorithm.
|
protected int |
pkcs11GetKeySize(java.security.Key key)
Determines the key size in bits.
|
getDefaultMode, getDefaultPadding, getMechanism, getMechanismForModeAndPadding, isExternalPaddingSupported, isPaddingSupported, pkcs11DoFinal, pkcs11GetIV, pkcs11GetParameters, pkcs11Init, pkcs11Init, pkcs11Update
engineDoFinal, engineDoFinal, engineGetBlockSize, engineGetIV, engineGetKeySize, engineGetOutputSize, engineGetParameters, engineInit, engineInit, engineInit, engineSetMode, engineSetPadding, engineUnwrap, engineUpdate, engineUpdate, engineUpdateAAD, engineWrap, finalize, finalizePkcs11Operation, getFullAlgorithmName, initialize, initializePkcs11Operation, initializeSession, initializeSoftwareDelegate, isSupportedBy, pkcs11DoFinal, pkcs11GetOutputSize, pkcs11Init, pkcs11Unwrap, pkcs11Update, pkcs11Wrap, updateAAD, updateAAD, updateAAD
protected static final java.lang.String CIPHER_NAME
protected static final iaik.pkcs.pkcs11.Mechanism DEFAULT_MECHANISM
protected static java.util.Vector supportedModes_
protected static java.util.Hashtable cipherModePaddingMechansims_
protected iaik.pkcs.pkcs11.Mechanism[] getUsedMechanisms()
getRequiredMechanismFeatures()
method.getUsedMechanisms
in class PKCS11Cipher
getUsedMechanismFeatures()
. May be empty, but must not be null.protected iaik.pkcs.pkcs11.MechanismInfo[][] getUsedMechanismFeatures()
getUsedMechanisms()
. The array at this index is the list of used feature
combinations used by this engine. The current token must at least support one mechanism and one
of the feature combinations (expressed as a MechanismInfo) of the same mechanism.getUsedMechanismFeatures
in class BlockCipher
getUsedMechanisms()
. The token must at
least support one of these features.protected void checkKeyObject(iaik.pkcs.pkcs11.objects.Key keyObject) throws java.security.InvalidKeyException
checkKeyObject
in class BlockCipher
keyObject
- The key object to check.java.security.InvalidKeyException
- If this cipher cannot work with this type of key object.protected java.lang.String getAlgorithmName()
getAlgorithmName
in class PKCS11Cipher
protected java.util.Hashtable getModePaddingMechanisms()
getModePaddingMechanisms
in class BlockCipher
protected iaik.pkcs.pkcs11.Mechanism getDefaultMechanism()
getDefaultMechanism
in class BlockCipher
protected int getOutputSize(int inputLen)
inputLen
- The length of the input data in bytes.protected int pkcs11GetKeySize(java.security.Key key) throws java.security.InvalidKeyException
pkcs11GetKeySize
in class BlockCipher
key
- The key to get the length for.java.security.InvalidKeyException
- If the given key is not supported by this class.protected int pkcs11GetBlockSize()
pkcs11GetBlockSize
in class BlockCipher
protected boolean isModeSupported(java.lang.String mode)
isModeSupported
in class BlockCipher
mode
- The mode to check.IAIK JavaSecurity Website https://jce.iaik.tugraz.at/
IAIK at Graz University of Technology, Austria, Europe
Copyright 2001-2023 IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved. Version 1.9.4