All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Acme.Crypto.NullCipher

java.lang.Object
   |
   +----Acme.Crypto.CryptoUtils
           |
           +----Acme.Crypto.Cipher
                   |
                   +----Acme.Crypto.BlockCipher
                           |
                           +----Acme.Crypto.NullCipher

public class NullCipher
extends BlockCipher
The null encryption method.

This is a block cipher that just copies input to output, unmodified. It's mostly for testing. However, using the null cipher in CBC mode, for example via EncryptedOutputStream and EncryptedInputStream, turns out to hash things up enough to protect against casual inspection. There may be applications where this is appropriate.

Fetch the software.
Fetch the entire Acme package.

See Also:
EncryptedOutputStream, EncryptedInputStream

Constructor Index

 o NullCipher()
Constructor.

Method Index

 o decrypt(byte[], int, byte[], int)
"Decrypt" a block of eight bytes.
 o encrypt(byte[], int, byte[], int)
"Encrypt" a block of eight bytes.
 o setKey(byte[])
Set the key.

Constructors

 o NullCipher
 public NullCipher()
Constructor.

Methods

 o setKey
 public void setKey(byte key[])
Set the key. Null routine to avoid compilation error.

Overrides:
setKey in class Cipher
 o encrypt
 public void encrypt(byte clearText[],
                     int clearOff,
                     byte cipherText[],
                     int cipherOff)
"Encrypt" a block of eight bytes.

Overrides:
encrypt in class BlockCipher
 o decrypt
 public void decrypt(byte cipherText[],
                     int cipherOff,
                     byte clearText[],
                     int clearOff)
"Decrypt" a block of eight bytes.

Overrides:
decrypt in class BlockCipher

All Packages  Class Hierarchy  This Package  Previous  Next  Index

ACME Java  ACME Labs