Top Fields Constructors Methods
org.apache.sshd.common.cipher

public Class BaseCTRCipher

extends BaseCipher
Class Inheritance
Imports
java.security.InvalidAlgorithmParameterException, .InvalidKeyException, java.security.spec.AlgorithmParameterSpec, javax.crypto.spec.IvParameterSpec, org.apache.sshd.common.util.buffer.ByteArrayBuffer

Field Summary

Modifier and TypeField and Description
private long
Inherited from org.apache.sshd.common.cipher.BaseCipher:
alwaysReInitfactorymode

Constructor Summary

AccessConstructor and Description
public
BaseCTRCipher(int ivsize, int authSize, int kdfSize, String algorithm, int keySize, String transformation, int blkSize)

Method Summary

Modifier and TypeMethod and Description
private void
addCarry(byte[] iv, int length, int carry)

protected AlgorithmParameterSpec
protected void
reInit(byte[] processed, int offset, int length)

Overrides org.apache.sshd.common.cipher.BaseCipher.reInit.

public void
update(byte[]
The input/output bytes
input
,
int
The offset of the data in the data buffer
inputOffset
,
int
The number of bytes to update, starting at the given offset; must be a multiple of the cipher's block size
inputLen
)

Overrides org.apache.sshd.common.cipher.BaseCipher.update.

Implements org.apache.sshd.common.cipher.Cipher.update.

Performs in-place encryption or decryption on the given data.

Inherited from org.apache.sshd.common.cipher.BaseCipher:
createCipherInstancegetAlgorithmgetAuthenticationTagSizegetCipherBlockSizegetCipherInstancegetIVSizegetKdfSizegetKeySizegetTransformationinitinitializeIVDatainitializeKeyDataresizetoStringupdateAAD

Field Detail

blocksProcessedback to summary
private long blocksProcessed

Constructor Detail

BaseCTRCipherback to summary
public BaseCTRCipher(int ivsize, int authSize, int kdfSize, String algorithm, int keySize, String transformation, int blkSize)

Method Detail

addCarryback to summary
private void addCarry(byte[] iv, int length, int carry)
determineNewParametersback to summary
protected AlgorithmParameterSpec determineNewParameters(byte[] processed, int offset, int length)

Overrides org.apache.sshd.common.cipher.BaseCipher.determineNewParameters.

Annotations
@Override
reInitback to summary
protected void reInit(byte[] processed, int offset, int length) throws InvalidKeyException, InvalidAlgorithmParameterException

Overrides org.apache.sshd.common.cipher.BaseCipher.reInit.

Annotations
@Override
updateback to summary
public void update(byte[] input, int inputOffset, int inputLen) throws Exception

Overrides org.apache.sshd.common.cipher.BaseCipher.update.

Implements org.apache.sshd.common.cipher.Cipher.update.

Doc from org.apache.sshd.common.cipher.Cipher.update.

Performs in-place encryption or decryption on the given data.

Parameters
input:byte[]

The input/output bytes

inputOffset:int

The offset of the data in the data buffer

inputLen:int

The number of bytes to update, starting at the given offset; must be a multiple of the cipher's block size

Annotations
@Override
Exceptions
Exception:
If failed to execute