Package org.apache.sshd.common.cipher
Class CipherNone
- java.lang.Object
-
- org.apache.sshd.common.cipher.CipherNone
-
- All Implemented Interfaces:
AlgorithmNameProvider,Cipher,CipherInformation,KeySizeIndicator
public class CipherNone extends java.lang.Object implements Cipher
Represents a no-op cipher. This cipher can not really be used during authentication and should only be used after, so that authentication remains secured, but not the remaining of the exchanges.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.sshd.common.cipher.Cipher
Cipher.Mode
-
-
Constructor Summary
Constructors Constructor Description CipherNone()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAlgorithm()intgetCipherBlockSize()intgetIVSize()intgetKdfSize()intgetKeySize()java.lang.StringgetTransformation()voidinit(Cipher.Mode mode, byte[] key, byte[] iv)Initialize the cipher for encryption or decryption with the given key and initialization vectorvoidupdate(byte[] input, int inputOffset, int inputLen)Performs in-place encryption or decryption on the given data.
-
-
-
Method Detail
-
getAlgorithm
public java.lang.String getAlgorithm()
- Specified by:
getAlgorithmin interfaceAlgorithmNameProvider
-
getKeySize
public int getKeySize()
- Specified by:
getKeySizein interfaceKeySizeIndicator- Returns:
- The number of bits used in the key
-
getTransformation
public java.lang.String 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)
-
getKdfSize
public int getKdfSize()
- Specified by:
getKdfSizein interfaceCipherInformation- Returns:
- The block size (in bytes) used to derive the secret key for this cipher
-
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
-
init
public void init(Cipher.Mode mode, byte[] key, byte[] iv) throws java.lang.Exception
Description copied from interface:CipherInitialize the cipher for encryption or decryption with the given key and initialization vector
-
update
public void update(byte[] input, int inputOffset, int inputLen) throws java.lang.ExceptionDescription copied from interface:CipherPerforms in-place encryption or decryption on the given data.
-
-