com.maverick.ssh.components.standalone
Class AES128Ctr

java.lang.Object
  extended bycom.maverick.ssh.components.SshCipher
      extended bycom.maverick.ssh.components.standalone.CtrBlockCipher
          extended bycom.maverick.ssh.components.standalone.AES128Ctr

public class AES128Ctr
extends com.maverick.ssh.components.standalone.CtrBlockCipher

128 bit Counter Mode AES cipher

Author:
Lee David Painter

Field Summary
static java.lang.String AES128_CTR
           
 
Fields inherited from class com.maverick.ssh.components.SshCipher
DECRYPT_MODE, ENCRYPT_MODE
 
Constructor Summary
AES128Ctr()
           
 
Method Summary
 int getBlockSize()
          Get the cipher block size.
 void init(int mode, byte[] iv, byte[] keydata)
          Initialize the cipher with up to 40 bytes of iv and key data.
 int processBlock(byte[] in, int inOff, byte[] out, int outOff)
           
 void transform(byte[] in, int start, byte[] output, int offset, 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.maverick.ssh.components.SshCipher
getAlgorithm, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AES128_CTR

public static final java.lang.String AES128_CTR
See Also:
Constant Field Values
Constructor Detail

AES128Ctr

public AES128Ctr()
Method Detail

transform

public void transform(byte[] in,
                      int start,
                      byte[] output,
                      int offset,
                      int len)
               throws java.io.IOException
Description copied from class: SshCipher
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.

Specified by:
transform in class SshCipher
Parameters:
in -
start -
output -
offset -
len -
Throws:
java.io.IOException

init

public void init(int mode,
                 byte[] iv,
                 byte[] keydata)
          throws java.io.IOException
Description copied from class: SshCipher
Initialize 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:
init in class SshCipher
Parameters:
mode - the mode to operate
iv - the initiaization vector
keydata - the key data
Throws:
java.io.IOException

getBlockSize

public int getBlockSize()
Description copied from class: SshCipher
Get the cipher block size.

Specified by:
getBlockSize in class SshCipher
Returns:
the block size in bytes.

processBlock

public int processBlock(byte[] in,
                        int inOff,
                        byte[] out,
                        int outOff)
                 throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2003-2008 SSHTools LTD. All Rights Reserved.