All Packages  Class Hierarchy  This Package  Previous  Next  Index


Class Acme.Crypto.BlowfishCipher

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

public class BlowfishCipher
extends BlockCipher
The Blowfish encryption method.

This is surprisingly fast, for pure Java. On a SPARC 20, wrapped in Acme.Crypto.EncryptedOutputStream or Acme.Crypto.EncryptedInputStream, it does around 8000 bytes/second, somewhat faster than Acme.Crypto.DesCipher.

With help from David Brownell.

Fetch the software.
Fetch the entire Acme package.

See Also:
EncryptedOutputStream, EncryptedInputStream

Constructor Index

 o BlowfishCipher(byte[])
 o BlowfishCipher(String)

Method Index

 o decrypt(byte[], int, byte[], int)
Decrypt a block of eight bytes.
 o decrypt(int[])
Decrypt a block of two ints.
 o encrypt(byte[], int, byte[], int)
Encrypt a block of eight bytes.
 o main(String[])
Test routine.
 o setKey(byte[])
Set the key.

Constructors

 o BlowfishCipher
 public BlowfishCipher(String keyStr)
 o BlowfishCipher
 public BlowfishCipher(byte key[])

Methods

 o setKey
 public void setKey(byte key[])
Set the key.

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
 o decrypt
 public void decrypt(int text[])
Decrypt a block of two ints.

 o main
 public static void main(String args[])
Test routine.


All Packages  Class Hierarchy  This Package  Previous  Next  Index

ACME Java  ACME Labs