public class Rc4Cipher extends PKCS11Cipher
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
CIPHER_NAME
The JCE name of this cipher.
|
protected static iaik.pkcs.pkcs11.Mechanism |
DEFAULT_MECHANISM
The defualt mechanism for this cipher.
|
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 |
---|
Rc4Cipher()
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 iaik.pkcs.pkcs11.Mechanism |
getMechanism()
Get the current mechanism of this cipher object.
|
protected boolean |
isModeSupported(java.lang.String mode)
This implementation does not support modes; i.e.
|
protected boolean |
isPaddingSupported(java.lang.String padding)
This implementation does not support paddings; i.e.
|
protected int |
pkcs11GetBlockSize()
Get the block size of this cipher algorithm.
|
protected int |
pkcs11GetKeySize(java.security.Key key)
Determines the key size in bits.
|
protected int |
pkcs11GetOutputSize(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 void |
pkcs11Init(int operationMode,
java.security.Key key,
java.security.spec.AlgorithmParameterSpec parameterSpecs,
java.security.SecureRandom randomSource)
Initialize this cipher for an operation.
|
engineDoFinal, engineDoFinal, engineGetBlockSize, engineGetIV, engineGetKeySize, engineGetOutputSize, engineGetParameters, engineInit, engineInit, engineInit, engineSetMode, engineSetPadding, engineUnwrap, engineUpdate, engineUpdate, engineUpdateAAD, engineWrap, finalize, finalizePkcs11Operation, getFullAlgorithmName, getUsedMechanismFeatures, getUsedMechanisms, initialize, initializePkcs11Operation, initializeSession, initializeSoftwareDelegate, isSupportedBy, pkcs11DoFinal, pkcs11DoFinal, pkcs11GetIV, pkcs11GetParameters, pkcs11Init, pkcs11Init, pkcs11Unwrap, pkcs11Update, pkcs11Update, pkcs11Wrap, updateAAD, updateAAD, updateAAD
protected static final java.lang.String CIPHER_NAME
protected static final iaik.pkcs.pkcs11.Mechanism DEFAULT_MECHANISM
protected void checkKeyObject(iaik.pkcs.pkcs11.objects.Key keyObject) throws java.security.InvalidKeyException
checkKeyObject
in class PKCS11Cipher
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 boolean isModeSupported(java.lang.String mode)
null
or must
equal NONE
.isModeSupported
in class PKCS11Cipher
mode
- The mode to check.protected boolean isPaddingSupported(java.lang.String padding)
null
or
must equal NoPadding
isPaddingSupported
in class PKCS11Cipher
padding
- The padding scheme to check.protected int pkcs11GetOutputSize(int inputLen)
pkcs11GetOutputSize
in class PKCS11Cipher
inputLen
- The length of the input data in bytes.protected int pkcs11GetKeySize(java.security.Key key) throws java.security.InvalidKeyException
pkcs11GetKeySize
in class PKCS11Cipher
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 PKCS11Cipher
protected void pkcs11Init(int operationMode, java.security.Key key, java.security.spec.AlgorithmParameterSpec parameterSpecs, java.security.SecureRandom randomSource) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException
pkcs11Init
in class PKCS11Cipher
operationMode
- The operation to initialize; Cipher.ENCRYPT_MODE, Cipher.DECRYPT_MODE,
Cipher.UNWRAP_MODE or Cipher.WRAP_MODE.key
- The key to use for the operation.parameterSpecs
- The parameter specs to use. Some cipher do not support parameter specs, they require
null.randomSource
- Optional random source to use.java.security.InvalidAlgorithmParameterException
- If the parameter specs are invalid.java.security.InvalidKeyException
- If the key is invalid for this operation.protected iaik.pkcs.pkcs11.Mechanism getDefaultMechanism()
getDefaultMechanism
in class PKCS11Cipher
protected iaik.pkcs.pkcs11.Mechanism getMechanism()
getMechanism
in class PKCS11Cipher
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