|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bouncycastle.crypto.digests.WhirlpoolDigest
public final class WhirlpoolDigest
Implementation of WhirlpoolDigest, based on Java source published by Barreto and Rijmen.
Field Summary | |
---|---|
private short[] |
_bitCount
|
private long[] |
_block
|
private byte[] |
_buffer
|
private int |
_bufferPos
|
private long[] |
_hash
|
private long[] |
_K
|
private long[] |
_L
|
private long[] |
_rc
|
private long[] |
_state
|
private static int |
BITCOUNT_ARRAY_SIZE
|
private static int |
BYTE_LENGTH
|
private static long[] |
C0
|
private static long[] |
C1
|
private static long[] |
C2
|
private static long[] |
C3
|
private static long[] |
C4
|
private static long[] |
C5
|
private static long[] |
C6
|
private static long[] |
C7
|
private static int |
DIGEST_LENGTH_BYTES
|
private static short[] |
EIGHT
|
private static int |
REDUCTION_POLYNOMIAL
|
private static int |
ROUNDS
|
private static int[] |
SBOX
|
Constructor Summary | |
---|---|
WhirlpoolDigest()
|
|
WhirlpoolDigest(WhirlpoolDigest originalDigest)
Copy constructor. |
Method Summary | |
---|---|
private long |
bytesToLongFromBuffer(byte[] buffer,
int startPos)
|
private void |
convertLongToByteArray(long inputLong,
byte[] outputArray,
int offSet)
|
private byte[] |
copyBitLength()
|
int |
doFinal(byte[] out,
int outOff)
close the digest, producing the final digest value. |
private void |
finish()
|
java.lang.String |
getAlgorithmName()
return the algorithm name |
int |
getByteLength()
Return the size in bytes of the internal buffer the digest applies it's compression function to. |
int |
getDigestSize()
return the size, in bytes, of the digest produced by this message digest. |
private void |
increment()
|
private int |
maskWithReductionPolynomial(int input)
|
private long |
packIntoLong(int b7,
int b6,
int b5,
int b4,
int b3,
int b2,
int b1,
int b0)
|
protected void |
processBlock()
|
private void |
processFilledBuffer(byte[] in,
int inOff)
|
void |
reset()
reset the chaining variables |
void |
update(byte in)
update the message digest with a single byte. |
void |
update(byte[] in,
int inOff,
int len)
update the message digest with a block of bytes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int BYTE_LENGTH
private static final int DIGEST_LENGTH_BYTES
private static final int ROUNDS
private static final int REDUCTION_POLYNOMIAL
private static final int[] SBOX
private static final long[] C0
private static final long[] C1
private static final long[] C2
private static final long[] C3
private static final long[] C4
private static final long[] C5
private static final long[] C6
private static final long[] C7
private final long[] _rc
private static final int BITCOUNT_ARRAY_SIZE
private byte[] _buffer
private int _bufferPos
private short[] _bitCount
private long[] _hash
private long[] _K
private long[] _L
private long[] _block
private long[] _state
private static final short[] EIGHT
Constructor Detail |
---|
public WhirlpoolDigest()
public WhirlpoolDigest(WhirlpoolDigest originalDigest)
Method Detail |
---|
private long packIntoLong(int b7, int b6, int b5, int b4, int b3, int b2, int b1, int b0)
private int maskWithReductionPolynomial(int input)
public java.lang.String getAlgorithmName()
Digest
getAlgorithmName
in interface Digest
public int getDigestSize()
Digest
getDigestSize
in interface Digest
public int doFinal(byte[] out, int outOff)
Digest
doFinal
in interface Digest
out
- the array the digest is to be copied into.outOff
- the offset into the out array the digest is to start at.public void reset()
reset
in interface Digest
private void processFilledBuffer(byte[] in, int inOff)
private long bytesToLongFromBuffer(byte[] buffer, int startPos)
private void convertLongToByteArray(long inputLong, byte[] outputArray, int offSet)
protected void processBlock()
public void update(byte in)
Digest
update
in interface Digest
in
- the input byte to be entered.private void increment()
public void update(byte[] in, int inOff, int len)
Digest
update
in interface Digest
in
- the byte array containing the data.inOff
- the offset into the byte array where the data starts.len
- the length of the data.private void finish()
private byte[] copyBitLength()
public int getByteLength()
ExtendedDigest
getByteLength
in interface ExtendedDigest
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |