sam.cipher
Class Twofish.Key

java.lang.Object
  |
  +--sam.cipher.Key
        |
        +--sam.cipher.Twofish.Key
Enclosing class:
Twofish

public static class Twofish.Key
extends Key

Key implementation that is adapted to the Twofish cipher.


Nested Class Summary
 
Nested classes inherited from class sam.cipher.Key
Key.Mode
 
Field Summary
 
Fields inherited from class sam.cipher.Key
asBooleans, asBytes, ASCII, asInts, asLongs, asShorts, BINARY, bits, bitsPerLong, direction, EMPTY, HEXA, IGNORE, mask, OCTAL, PLAIN, UNICODE
 
Constructor Summary
Twofish.Key(long[] bits)
          Mandatory constructor implementation.
Twofish.Key(java.lang.String password, Key.Mode mode)
           
 
Method Summary
 sam.cipher.Key inverse()
          Inverses this key.
 boolean isEmpty()
          Wether this key is empty
 
Methods inherited from class sam.cipher.Key
equals, expandToBytes, expandToInts, expandToLongs, expandToShorts, get1, get16, get32, get64, get8, getBits, getBooleans, getBytes, getInts, getLongs, getShorts, parse, toBytes, toLongs, toLongs, toLongs, toLongs, toLongs, toPassword, toPassword, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Twofish.Key

public Twofish.Key(java.lang.String password,
                   Key.Mode mode)

Twofish.Key

public Twofish.Key(long[] bits)
Mandatory constructor implementation.

See Also:
ReflexiveFactory
Method Detail

inverse

public sam.cipher.Key inverse()
Description copied from class: Key
Inverses this key. This turns a ciphering key into a de-ciphering one, and vice-versa. To be overriden as required.

This implementation simply returns this.

Overrides:
inverse in class Key

isEmpty

public boolean isEmpty()
Description copied from class: Key
Wether this key is empty

Overrides:
isEmpty in class Key