All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface is.logi.crypto.keys.CipherKey

public interface CipherKey
extends Key
This interface is implemented by keys which handle encryption and decryption of single blocks of data.

Author:
Logi Ragnarsson (logir@hi.is)

Method Index

 o cipherBlockSize()
Returns the size of the blocks that can be decrypted in one call to decrypt().
 o decrypt(byte[], int, byte[], int)
Decrypt one block of data.
 o encrypt(byte[], int, byte[], int)
Encrypt one block of data.
 o plainBlockSize()
Returns the size of the blocks that can be encrypted in one call to encrypt().

Methods

 o plainBlockSize
 public abstract int plainBlockSize()
Returns the size of the blocks that can be encrypted in one call to encrypt().

 o cipherBlockSize
 public abstract int cipherBlockSize()
Returns the size of the blocks that can be decrypted in one call to decrypt().

 o encrypt
 public abstract void encrypt(byte source[],
                              int i,
                              byte dest[],
                              int j)
Encrypt one block of data. The plaintext is taken from source starting at offset i and ciphertext is written to dest, starting at offset j.

The amount of data read and written will match the values returned by plainBlockSize() and cipherBlockSize().

 o decrypt
 public abstract void decrypt(byte source[],
                              int i,
                              byte dest[],
                              int j)
Decrypt one block of data. The ciphertext is taken from source starting at offset i and plaintext is written to dest, starting at offset j.

The amount of data read and written will match the values returned by cipherBlockSize() and plainBlockSize().


All Packages  Class Hierarchy  This Package  Previous  Next  Index