JXTA

jxta.security.cipher
Interface Cipher


public interface Cipher
extends Description


Field Summary
static byte ALG_RC4
           
static java.lang.String Ciper
           
static byte MODE_DECRYPT
           
static byte MODE_ENCRYPT
           
static byte MODE_UNKNOWN
           
 
Method Summary
 int doFinal(byte[] inBuff, int inOffset, int inLength, byte[] outBuff, int outOffset)
          Generate encrypted/decrypted output for all | last input data
 byte getAlgorithm()
          // return the algorithm used
 void init(Key theKey, byte theMode)
          Initiate Cipher object with key.
 void init(Key theKey, byte theMode, byte[] bArray, int bOff, int bLen)
          Initiate the instance of Cipher with the right key, parameters, etc ...
 int update(byte[] inBuff, int inOffset, int inLength, byte[] outBuff, int outOffset)
           
 
Methods inherited from interface jxta.security.util.Description
clearDebug, getAlgorithmName, setDebug
 

Field Detail

Ciper

public static final java.lang.String Ciper

ALG_RC4

public static final byte ALG_RC4

MODE_ENCRYPT

public static final byte MODE_ENCRYPT

MODE_DECRYPT

public static final byte MODE_DECRYPT

MODE_UNKNOWN

public static final byte MODE_UNKNOWN
Method Detail

init

public void init(Key theKey,
                 byte theMode)
          throws CryptoException
Initiate Cipher object with key. Here, either no parameters, or constant parameter values

init

public void init(Key theKey,
                 byte theMode,
                 byte[] bArray,
                 int bOff,
                 int bLen)
          throws CryptoException
Initiate the instance of Cipher with the right key, parameters, etc ...

getAlgorithm

public byte getAlgorithm()
// return the algorithm used

update

public int update(byte[] inBuff,
                  int inOffset,
                  int inLength,
                  byte[] outBuff,
                  int outOffset)
           throws CryptoException

doFinal

public int doFinal(byte[] inBuff,
                   int inOffset,
                   int inLength,
                   byte[] outBuff,
                   int outOffset)
            throws CryptoException
Generate encrypted/decrypted output for all | last input data

JXTA