|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--sam.cipher.Cipher
|
+--sam.cipher.Twofish
Implementation of the Twofish cipher. Retrofitted for personal use by Guillaume Lacôte.
Copyright (c) 1997, 1998 Systemics Ltd on behalf of
the Cryptix Development Team. All rights reserved.
Copyright © 1998
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: $
| Nested Class Summary | |
static class |
Twofish.Key
Key implementation that is adapted to the Twofish cipher. |
| Nested classes inherited from class sam.cipher.Cipher |
Cipher.ByteArrayFilter, Cipher.Error |
| Field Summary |
| Fields inherited from class sam.cipher.Cipher |
DECRYPT, EMPTY, ENCRYPT, INVERSE, key, REGISTRY |
| Constructor Summary | |
Twofish(sam.cipher.Key key)
|
|
| Method Summary | |
protected void |
decrypt(byte[] data,
int offset,
sam.cipher.Key aKey)
Decrypt exactly one block of ciphertext. |
protected void |
encrypt(byte[] data,
int offset,
sam.cipher.Key aKey)
Encrypt exactly one block of plaintext. |
int |
getPreferredSize(int size)
Specifiy preferred buffer size. |
| Methods inherited from class sam.cipher.Cipher |
cipher, cipher, fill, main, store, store, storeReversed, streamTest, test, unstoreInt, unstoreLong, unstoreReversedLong |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Twofish(sam.cipher.Key key)
| Method Detail |
public int getPreferredSize(int size)
CipherMay return a fixed value, ignoring suggested size (e.g. return 16;).
By default, this implementation simply returns its argument unchanged.
getPreferredSize in class Ciphersize - proposed buffer size (in bytes)
protected void encrypt(byte[] data,
int offset,
sam.cipher.Key aKey)
encrypt in class Cipherdata - The plaintext.aKey - The session key to use for encryption.
protected void decrypt(byte[] data,
int offset,
sam.cipher.Key aKey)
decrypt in class Cipherdata - The ciphertext.aKey - The session key to use for decryption.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||