|
Bouncy Castle Cryptography 1.50 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bouncycastle.crypto.digests.SkeinEngine
public class SkeinEngine
Implementation of the Skein family of parameterised hash functions in 256, 512 and 1024 bit block
sizes, based on the Threefish
tweakable block cipher.
SkeinDigest
and SkeinMac
, implementing the
parameter based configuration system that allows Skein to be adapted to multiple applications. SkeinParameters
allows standard and arbitrary parameters to
be applied during the Skein hash function.
Implemented:
SkeinParameters
Nested Class Summary | |
---|---|
static class |
SkeinEngine.Parameter
|
Field Summary | |
---|---|
static int |
SKEIN_1024
1024 bit block size - Skein 1024 |
static int |
SKEIN_256
256 bit block size - Skein 256 |
static int |
SKEIN_512
512 bit block size - Skein 512 |
Constructor Summary | |
---|---|
SkeinEngine(int blockSizeBits,
int outputSizeBits)
Constructs a Skein engine. |
|
SkeinEngine(SkeinEngine engine)
Creates a SkeinEngine as an exact copy of an existing instance. |
Method Summary | |
---|---|
Memoable |
copy()
Produce a copy of this object with its configuration and in its current state. |
int |
doFinal(byte[] out,
int outOff)
|
int |
getBlockSize()
|
int |
getOutputSize()
|
void |
init(SkeinParameters params)
Initialises the Skein engine with the provided parameters. |
void |
reset()
Reset the engine to the initial state (with the key and any pre-message parameters , ready to accept message input. |
void |
reset(Memoable other)
Restore a copied object state into this object. |
void |
update(byte in)
|
void |
update(byte[] in,
int inOff,
int len)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SKEIN_256
public static final int SKEIN_512
public static final int SKEIN_1024
Constructor Detail |
---|
public SkeinEngine(int blockSizeBits, int outputSizeBits)
blockSizeBits
- the internal state size in bits - one of SKEIN_256
, SKEIN_512
or
SKEIN_1024
.outputSizeBits
- the output/digest size to produce in bits, which must be an integral number of
bytes.public SkeinEngine(SkeinEngine engine)
Method Detail |
---|
public Memoable copy()
Memoable
copy
in interface Memoable
public void reset(Memoable other)
Memoable
reset
in interface Memoable
other
- an object originally copied
from an object of the same type as this instance.public int getOutputSize()
public int getBlockSize()
public void init(SkeinParameters params)
SkeinParameters
for
details on the parameterisation of the Skein hash function.
params
- the parameters to apply to this engine, or null
to use no parameters.public void reset()
public void update(byte in)
public void update(byte[] in, int inOff, int len)
public int doFinal(byte[] out, int outOff)
|
Bouncy Castle Cryptography 1.50 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |