Package org.apache.sshd.common.cipher
Class BaseRC4Cipher
java.lang.Object
org.apache.sshd.common.cipher.BaseCipher
org.apache.sshd.common.cipher.BaseRC4Cipher
- All Implemented Interfaces:
AlgorithmNameProvider
,Cipher
,CipherInformation
,KeySizeIndicator
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sshd.common.cipher.BaseCipher
BaseCipher.CipherFactory
Nested classes/interfaces inherited from interface org.apache.sshd.common.cipher.Cipher
Cipher.Mode
-
Field Summary
FieldsFields inherited from class org.apache.sshd.common.cipher.BaseCipher
alwaysReInit, factory, mode
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Cipher
createCipherInstance
(Cipher.Mode mode, byte[] key, byte[] iv) protected byte[]
initializeIVData
(Cipher.Mode mode, byte[] iv, int reqLen) void
update
(byte[] input, int inputOffset, int inputLen) Performs in-place encryption or decryption on the given data.Methods inherited from class org.apache.sshd.common.cipher.BaseCipher
determineNewParameters, getAlgorithm, getAuthenticationTagSize, getCipherBlockSize, getCipherInstance, getIVSize, getKdfSize, getKeySize, getTransformation, init, initializeKeyData, reInit, resize, toString, updateAAD
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.sshd.common.cipher.Cipher
update, updateAAD, updateWithAAD
-
Field Details
-
SKIP_SIZE
public static final int SKIP_SIZE- See Also:
-
-
Constructor Details
-
BaseRC4Cipher
public BaseRC4Cipher(int ivsize, int kdfSize, int keySize, int blkSize)
-
-
Method Details
-
initializeIVData
- Overrides:
initializeIVData
in classBaseCipher
-
createCipherInstance
- Overrides:
createCipherInstance
in classBaseCipher
- Throws:
Exception
-
update
Description copied from interface:Cipher
Performs in-place encryption or decryption on the given data.- Specified by:
update
in interfaceCipher
- Overrides:
update
in 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
-