|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bouncycastle.crypto.engines.SkipjackEngine
public class SkipjackEngine
a class that provides a basic SKIPJACK engine.
Field Summary | |
---|---|
(package private) static int |
BLOCK_SIZE
|
private boolean |
encrypting
|
(package private) static short[] |
ftable
|
private int[] |
key0
|
private int[] |
key1
|
private int[] |
key2
|
private int[] |
key3
|
Constructor Summary | |
---|---|
SkipjackEngine()
|
Method Summary | |
---|---|
int |
decryptBlock(byte[] in,
int inOff,
byte[] out,
int outOff)
|
int |
encryptBlock(byte[] in,
int inOff,
byte[] out,
int outOff)
|
private int |
g(int k,
int w)
The G permutation |
java.lang.String |
getAlgorithmName()
Return the name of the algorithm the cipher implements. |
int |
getBlockSize()
Return the block size for this cipher (in bytes). |
private int |
h(int k,
int w)
the inverse of the G permutation. |
void |
init(boolean encrypting,
CipherParameters params)
initialise a SKIPJACK cipher. |
int |
processBlock(byte[] in,
int inOff,
byte[] out,
int outOff)
Process one block of input from the array in and write it to the out array. |
void |
reset()
Reset the cipher. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final int BLOCK_SIZE
static short[] ftable
private int[] key0
private int[] key1
private int[] key2
private int[] key3
private boolean encrypting
Constructor Detail |
---|
public SkipjackEngine()
Method Detail |
---|
public void init(boolean encrypting, CipherParameters params)
init
in interface BlockCipher
encrypting
- whether or not we are for encryption.params
- the parameters required to set up the cipher.
java.lang.IllegalArgumentException
- if the params argument is
inappropriate.public java.lang.String getAlgorithmName()
BlockCipher
getAlgorithmName
in interface BlockCipher
public int getBlockSize()
BlockCipher
getBlockSize
in interface BlockCipher
public int processBlock(byte[] in, int inOff, byte[] out, int outOff)
BlockCipher
processBlock
in interface BlockCipher
in
- the array containing the input data.inOff
- offset into the in array the data starts at.out
- the array the output data will be copied into.outOff
- the offset into the out array the output will start at.
public void reset()
BlockCipher
reset
in interface BlockCipher
private int g(int k, int w)
public int encryptBlock(byte[] in, int inOff, byte[] out, int outOff)
private int h(int k, int w)
public int decryptBlock(byte[] in, int inOff, byte[] out, int outOff)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |