iaik.me.security.cipher
Class RC2

java.lang.Object
  |
  +--iaik.me.security.Cipher
        |
        +--iaik.me.security.cipher.RC2

public class RC2
extends Cipher


Fields inherited from class iaik.me.security.Cipher
chainingMode, DECRYPT_MODE, ENCRYPT_MODE, iv, mode, MODE_CBC, MODE_ECB
 
Constructor Summary
RC2()
           
 
Method Summary
protected  void cryptBlock(byte[] in, int inOff, byte[] out, int outOff)
          Encrypt one block.
 int[] getKeyLength()
          Return the valid key lengths for this cipher.
 void init(int mode, CryptoBag keyb, Object params, SecureRandom random)
          Initialize this cipher.
 
Methods inherited from class iaik.me.security.Cipher
doFinal, doFinal, extractIV, getBlockSize, getInstance, getIV, init, register, setMode, setPadding, toString, update, updateInternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RC2

public RC2()
Method Detail

getKeyLength

public int[] getKeyLength()
Description copied from class: Cipher
Return the valid key lengths for this cipher. The array will always have four elements, key lengths are specified in bytes. The values identify the length of the key in bytes, not the entropy, i.e. DES returns 8 instead of 7.
[0] is the minimum allowable length (e.g. 1 byte (8 bit) for ARCFOUR).
[1] is the recommended default length (e.g. 16 byte (128 bit) for ARCFOUR).
[2] is the maximum allowable length (e.g. 128 byte (1024 bit) for ARCFOUR).
[3] is increment between key length (e.g. 1 byte (8 bit) for ARCFOUR), 4 byte (32 bit) for AES.
It is assumed that keys are always a integral number of bytes.
Overrides:
getKeyLength in class Cipher

init

public void init(int mode,
                 CryptoBag keyb,
                 Object params,
                 SecureRandom random)
          throws CryptoException
Description copied from class: Cipher
Initialize this cipher.
Overrides:
init in class Cipher

cryptBlock

protected void cryptBlock(byte[] in,
                          int inOff,
                          byte[] out,
                          int outOff)
Description copied from class: Cipher
Encrypt one block. To be implemented by subclasses.
Overrides:
cryptBlock in class Cipher

This Javadoc may contain text parts from IETF Internet Standard specifications, see copyright note) and RSA Data Security Public-Key Cryptography Standards (see copyright note).

IAIK-JCE ME 3.04, (c) 2002 IAIK, (c) 2003 to 2006 Stiftung SIC