| java.lang.Object com.quadcap.crypto.AbstractSymmetricKey com.quadcap.crypto.Tea256
Tea256 | public class Tea256 extends AbstractSymmetricKey implements SymmetricKey(Code) | | Implementation of Tiny Encryption Algorithm, modified to use longs
instead of ints. SO the key is now four longs, or 256 bits, and the
encryption/decryption proceeds 16 bytes at a time instead of 8.
The number of rounds has been retained at 32.
author: Stan Bailes |
Field Summary | |
long | abcd | final static long | delta Computed as (sqrt(5)-1) * 2**63, following original Tea choice of
delta. | final static int | rounds | long[] | v |
delta | final static long delta(Code) | | Computed as (sqrt(5)-1) * 2**63, following original Tea choice of
delta.
|
rounds | final static int rounds(Code) | | |
decrypt | public void decrypt(ByteBuffer code, ByteBuffer plain)(Code) | | Decrypt a buffer (must be a multiple of 16 bytes)
|
decrypt | final void decrypt(long[] v)(Code) | | |
encrypt | public void encrypt(ByteBuffer plain, ByteBuffer code)(Code) | | Encrypt a buffer (must be multiple of 16 bytes)
|
encrypt | final void encrypt(long[] v)(Code) | | |
getBlockSize | public int getBlockSize()(Code) | | |
init | public void init(String s)(Code) | | Initialize key from serialized representation
|
init | public void init(byte[] k)(Code) | | |
init | public void init(Random r)(Code) | | Initialize: Create a random key
|
toString | public String toString()(Code) | | Return the serialized form of the key
|
|
|