Class cryptix.security.Blowfish
All Packages Class Hierarchy This Package Previous Next Index
Class cryptix.security.Blowfish
java.lang.Object
|
+----cryptix.security.BlockCipher
|
+----cryptix.security.Blowfish
- public final class Blowfish
- extends BlockCipher
This class implements the Blowfish block cipher.
However, it relies on linked in libraries which are not currently
present.
References
Blowfish was written by Bruce Schneier.
See
Bruce Schneier,
"Chapter 14.3 Blowfish,"
Applied Cryptography,
Wiley 2nd Ed, 1996,
and
Bruce Schneier,
"Description of a New Variable-Length Key, 64-Bit Cipher (Blowfish),"
Fast Software Encryption Cambridge Security Workshop Proceedings,
Springer-Verlag, 1004, pp 191-204.
The algorithm is in the public domain.
Copyright © 1997
Systemics Ltd
on behalf of the
Cryptix Development Team.
All rights reserved.
- Author:
- Systemics Ltd
- See Also:
- java
-
BLOCK_LENGTH
- This is the length of a block.
-
Blowfish(byte[])
- This creates a Blowfish block cipher from a byte array of a variable length.
-
blockDecrypt(byte[], int, byte[], int)
- Decrypt a block.
-
blockEncrypt(byte[], int, byte[], int)
- Encrypt a block.
-
blockLength()
- Return the block length of this cipher.
-
getLinkErrorString()
-
-
hasFileLibraryLoaded()
-
-
isLibraryCorrect()
-
-
keyLength()
- Return the key length for this cipher.
BLOCK_LENGTH
public final static int BLOCK_LENGTH
- This is the length of a block.
Blowfish
public Blowfish(byte userKey[])
- This creates a Blowfish block cipher from a byte array of a variable length.
- Parameters:
- userKey - the user key.
hasFileLibraryLoaded
public final static boolean hasFileLibraryLoaded()
isLibraryCorrect
public final static boolean isLibraryCorrect()
getLinkErrorString
public final static String getLinkErrorString()
blockEncrypt
protected void blockEncrypt(byte in[],
int in_offset,
byte out[],
int out_offset)
- Encrypt a block.
The in and out buffers can be the same.
- Parameters:
- in - The data to be encrypted.
- in_offset - The start of data within the in buffer.
- out - The encrypted data.
- out_offset - The start of data within the out buffer.
- Overrides:
- blockEncrypt in class BlockCipher
blockDecrypt
protected void blockDecrypt(byte in[],
int in_offset,
byte out[],
int out_offset)
- Decrypt a block.
The in and out buffers can be the same.
- Parameters:
- in - The data to be decrypted.
- in_offset - The start of data within the in buffer.
- out - The decrypted data.
- out_offset - The start of data within the out buffer.
- Overrides:
- blockDecrypt in class BlockCipher
blockLength
public int blockLength()
- Return the block length of this cipher.
- Returns:
- s the block length of this cipher.
- Overrides:
- blockLength in class BlockCipher
keyLength
public int keyLength()
- Return the key length for this cipher.
- Returns:
- s the length of the key used when constructing this cipher.
- Overrides:
- keyLength in class BlockCipher
All Packages Class Hierarchy This Package Previous Next Index