ch.ethz.ssh2.crypto.cipher
Class CTRMode
java.lang.Object
ch.ethz.ssh2.crypto.cipher.CTRMode
- All Implemented Interfaces:
- BlockCipher
public class CTRMode
- extends java.lang.Object
- implements BlockCipher
This is CTR mode as described in draft-ietf-secsh-newmodes-XY.txt
- Version:
- $Id: CTRMode.java,v 1.1 2005/06/06 12:44:25 cplattne Exp $
- Author:
- Christian Plattner, plattner@inf.ethz.ch
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
X
byte[] X
Xenc
byte[] Xenc
bc
BlockCipher bc
blockSize
int blockSize
doEncrypt
boolean doEncrypt
count
int count
CTRMode
public CTRMode(BlockCipher tc,
byte[] iv,
boolean doEnc)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
init
public void init(boolean forEncryption,
byte[] key)
- Specified by:
init
in interface BlockCipher
getBlockSize
public final int getBlockSize()
- Specified by:
getBlockSize
in interface BlockCipher
transformBlock
public final void transformBlock(byte[] src,
int srcoff,
byte[] dst,
int dstoff)
- Specified by:
transformBlock
in interface BlockCipher