public class

CTRMode

extends Object
implements BlockCipher
java.lang.Object
   ↳ com.trilead.ssh2.crypto.cipher.CTRMode

Class Overview

This is CTR mode as described in draft-ietf-secsh-newmodes-XY.txt

Summary

Fields
byte[] X
byte[] Xenc
BlockCipher bc
int blockSize
int count
boolean doEncrypt
Public Constructors
CTRMode(BlockCipher tc, byte[] iv, boolean doEnc)
Public Methods
final int getBlockSize()
void init(boolean forEncryption, byte[] key)
final void transformBlock(byte[] src, int srcoff, byte[] dst, int dstoff)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.trilead.ssh2.crypto.cipher.BlockCipher

Fields

byte[] X

byte[] Xenc

int blockSize

int count

boolean doEncrypt

Public Constructors

public CTRMode (BlockCipher tc, byte[] iv, boolean doEnc)

Parameters
tc
iv
doEnc

Public Methods

public final int getBlockSize ()

public void init (boolean forEncryption, byte[] key)

Parameters
forEncryption
key

public final void transformBlock (byte[] src, int srcoff, byte[] dst, int dstoff)

Parameters
src
srcoff
dst
dstoff