Class BaseCTRCipher
java.lang.Object
org.apache.sshd.common.cipher.BaseCipher
org.apache.sshd.common.cipher.BaseCTRCipher
- All Implemented Interfaces:
AlgorithmNameProvider, Cipher, CipherInformation, KeySizeIndicator
-
Nested Class Summary
Nested classes/interfaces inherited from class BaseCipher
BaseCipher.CipherFactoryNested classes/interfaces inherited from interface Cipher
Cipher.Mode -
Field Summary
FieldsFields inherited from class BaseCipher
alwaysReInit, factory, mode -
Constructor Summary
ConstructorsConstructorDescriptionBaseCTRCipher(int ivsize, int authSize, int kdfSize, String algorithm, int keySize, String transformation, int blkSize) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddCarry(byte[] iv, int length, int carry) protected AlgorithmParameterSpecdetermineNewParameters(byte[] processed, int offset, int length) protected voidreInit(byte[] processed, int offset, int length) voidupdate(byte[] input, int inputOffset, int inputLen) Performs in-place encryption or decryption on the given data.Methods inherited from class BaseCipher
createCipherInstance, getAlgorithm, getAuthenticationTagSize, getCipherBlockSize, getCipherInstance, getIVSize, getKdfSize, getKeySize, getTransformation, init, initializeIVData, initializeKeyData, resize, toString, updateAADMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Cipher
update, updateAAD, updateWithAAD
-
Field Details
-
blocksProcessed
private long blocksProcessed
-
-
Constructor Details
-
BaseCTRCipher
-
-
Method Details
-
update
Description copied from interface:CipherPerforms in-place encryption or decryption on the given data.- Specified by:
updatein interfaceCipher- Overrides:
updatein classBaseCipher- Parameters:
input- The input/output bytesinputOffset- The offset of the data in the data bufferinputLen- The number of bytes to update, starting at the given offset; must be a multiple of the cipher's block size- Throws:
Exception- If failed to execute
-
reInit
protected void reInit(byte[] processed, int offset, int length) throws InvalidKeyException, InvalidAlgorithmParameterException - Overrides:
reInitin classBaseCipher- Throws:
InvalidKeyExceptionInvalidAlgorithmParameterException
-
determineNewParameters
- Overrides:
determineNewParametersin classBaseCipher
-
addCarry
private void addCarry(byte[] iv, int length, int carry)
-