Class AES128Gcm
java.lang.Object
com.sshtools.common.ssh.components.AbstractSshCipher
com.sshtools.common.ssh.components.jce.AbstractJCECipher
com.sshtools.common.ssh.components.jce.AES128Gcm
- All Implemented Interfaces:
Component,SshCipher,SshComponent,SecureComponent
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface com.sshtools.common.ssh.components.SshCipher
DECRYPT_MODE, ENCRYPT_MODE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintvoidinit(int mode, byte[] iv, byte[] keydata) Initialize the cipher with up to 40 bytes of iv and key data.booleanisMAC()voidtransform(byte[] buf, int start, byte[] output, int off, int len) Transform the byte array according to the cipher mode; it is legal for the source and destination arrays to reference the same physical array so care should be taken in the transformation process to safeguard this rule.Methods inherited from class com.sshtools.common.ssh.components.jce.AbstractJCECipher
createCipher, getBlockSize, getKeyLength, getProvider, getProviderNameMethods inherited from class com.sshtools.common.ssh.components.AbstractSshCipher
getAlgorithm, getPriority, getSecurityLevel, transform
-
Constructor Details
-
AES128Gcm
- Throws:
IOException
-
-
Method Details
-
init
Description copied from class:AbstractSshCipherInitialize the cipher with up to 40 bytes of iv and key data. Each implementation should take as much data from the initialization as it needs ignoring any data that it does not require.- Specified by:
initin interfaceSshCipher- Overrides:
initin classAbstractJCECipher- Parameters:
mode- the mode to operateiv- the initiaization vectorkeydata- the key data- Throws:
IOException
-
transform
Description copied from class:AbstractSshCipherTransform the byte array according to the cipher mode; it is legal for the source and destination arrays to reference the same physical array so care should be taken in the transformation process to safeguard this rule.- Specified by:
transformin interfaceSshCipher- Overrides:
transformin classAbstractJCECipher- Throws:
IOException
-
isMAC
public boolean isMAC()- Specified by:
isMACin interfaceSshCipher- Overrides:
isMACin classAbstractSshCipher
-
getMacLength
public int getMacLength()- Specified by:
getMacLengthin interfaceSshCipher- Overrides:
getMacLengthin classAbstractSshCipher
-