Class AbstractChaCha20Cipher
java.lang.Object
org.apache.sshd.common.cipher.AbstractChaCha20Cipher
- All Implemented Interfaces:
AlgorithmNameProvider, Cipher, CipherInformation, KeySizeIndicator
- Direct Known Subclasses:
ChaCha20Cipher
-
Nested Class Summary
Nested classes/interfaces inherited from interface Cipher
Cipher.Mode -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
BLOCK_BYTES
protected static final int BLOCK_BYTES- See Also:
-
-
Constructor Details
-
AbstractChaCha20Cipher
protected AbstractChaCha20Cipher()
-
-
Method Details
-
getAlgorithm
- Specified by:
getAlgorithmin interfaceAlgorithmNameProvider
-
getTransformation
- Specified by:
getTransformationin interfaceCipherInformation- Returns:
- The actual transformation used - e.g., AES/CBC/NoPadding
-
getIVSize
public int getIVSize()- Specified by:
getIVSizein interfaceCipherInformation- Returns:
- Size of the initialization vector (in bytes)
-
getAuthenticationTagSize
public int getAuthenticationTagSize()- Specified by:
getAuthenticationTagSizein interfaceCipherInformation- Returns:
- Size of the authentication tag (AT) in bytes or 0 if this cipher does not support authentication
-
getCipherBlockSize
public int getCipherBlockSize()- Specified by:
getCipherBlockSizein interfaceCipherInformation- Returns:
- Size of block data used by the cipher (in bytes). For stream ciphers this value is (currently) used to indicate some average work buffer size to be used for the automatic re-keying mechanism described in RFC 4253 - Section 9
-
getKdfSize
public int getKdfSize()- Specified by:
getKdfSizein interfaceCipherInformation- Returns:
- The block size (in bytes) used to derive the secret key for this cipher
-
getKeySize
public int getKeySize()- Specified by:
getKeySizein interfaceKeySizeIndicator- Returns:
- The number of bits used in the key
-
toString
-