public class ThreefishCipher extends Object implements org.bouncycastle.crypto.BlockCipher
| Modifier and Type | Class and Description |
|---|---|
class |
ThreefishCipher.Threefish1024
Threefish cipher with 1024 bit internal state.
|
class |
ThreefishCipher.Threefish256
Threefish cipher with 256 bit internal state.
|
class |
ThreefishCipher.Threefish512
Threefish cipher with 512 bit internal state.
|
| Constructor and Description |
|---|
ThreefishCipher() |
| Modifier and Type | Method and Description |
|---|---|
static ThreefishCipher |
createCipher(int stateSize) |
void |
decrypt(long[] input,
long[] output)
Decrypt function
Derived classes must implement this function.
|
void |
encrypt(long[] input,
long[] output)
Encrypt function
Derived classes must implement this function.
|
String |
getAlgorithmName() |
int |
getBlockSize() |
void |
init(boolean forEncryption,
org.bouncycastle.crypto.CipherParameters params) |
int |
processBlock(byte[] in,
int inOff,
byte[] out,
int outOff) |
void |
reset() |
void |
setKey(long[] key) |
void |
setTweak(long[] tweak) |
public void setTweak(long[] tweak)
public void setKey(long[] key)
public static ThreefishCipher createCipher(int stateSize)
public void init(boolean forEncryption,
org.bouncycastle.crypto.CipherParameters params)
throws IllegalArgumentException
init in interface org.bouncycastle.crypto.BlockCipherIllegalArgumentExceptionpublic String getAlgorithmName()
getAlgorithmName in interface org.bouncycastle.crypto.BlockCipherpublic int getBlockSize()
getBlockSize in interface org.bouncycastle.crypto.BlockCipherpublic int processBlock(byte[] in,
int inOff,
byte[] out,
int outOff)
throws org.bouncycastle.crypto.DataLengthException,
IllegalStateException
processBlock in interface org.bouncycastle.crypto.BlockCipherorg.bouncycastle.crypto.DataLengthExceptionIllegalStateExceptionpublic void reset()
reset in interface org.bouncycastle.crypto.BlockCipherpublic void encrypt(long[] input,
long[] output)
input - The plaintext input.output - The ciphertext output.public void decrypt(long[] input,
long[] output)
input - The ciphertext input.output - The plaintext output.Copyright © 2015. All rights reserved.