public class GOST3411Digest extends java.lang.Object implements ExtendedDigest
Modifier and Type | Field and Description |
---|---|
(package private) byte[] |
a |
private long |
byteCount |
private byte[][] |
C |
private static byte[] |
C2
reset the chaining variables to the IV values.
|
private BlockCipher |
cipher |
private static int |
DIGEST_LENGTH |
private byte[] |
H |
private byte[] |
K |
private byte[] |
L |
private byte[] |
M |
(package private) byte[] |
S |
private byte[] |
sBox |
private byte[] |
Sum |
(package private) byte[] |
U |
(package private) byte[] |
V |
(package private) byte[] |
W |
(package private) short[] |
w_S |
(package private) short[] |
wS |
private byte[] |
xBuf |
private int |
xBufOff |
Constructor and Description |
---|
GOST3411Digest()
Standard constructor
|
GOST3411Digest(byte[] sBoxParam)
Constructor to allow use of a particular sbox with GOST28147
|
GOST3411Digest(GOST3411Digest t)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
private byte[] |
A(byte[] in) |
private void |
cpyBytesToShort(byte[] S,
short[] wS) |
private void |
cpyShortToBytes(short[] wS,
byte[] S) |
int |
doFinal(byte[] out,
int outOff)
close the digest, producing the final digest value.
|
private void |
E(byte[] key,
byte[] s,
int sOff,
byte[] in,
int inOff) |
private void |
finish() |
private void |
fw(byte[] in) |
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 byte[] |
P(byte[] in) |
protected void |
processBlock(byte[] in,
int inOff) |
void |
reset()
reset the digest back to it's initial state.
|
private void |
sumByteArray(byte[] in) |
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.
|
private static final int DIGEST_LENGTH
private byte[] H
private byte[] L
private byte[] M
private byte[] Sum
private byte[][] C
private byte[] xBuf
private int xBufOff
private long byteCount
private BlockCipher cipher
private byte[] sBox
private byte[] K
byte[] a
short[] wS
short[] w_S
byte[] S
byte[] U
byte[] V
byte[] W
private static final byte[] C2
public GOST3411Digest()
public GOST3411Digest(byte[] sBoxParam)
GOST28147Engine.getSBox(String)
public GOST3411Digest(GOST3411Digest t)
public java.lang.String getAlgorithmName()
Digest
getAlgorithmName
in interface Digest
public int getDigestSize()
Digest
getDigestSize
in interface Digest
public void update(byte in)
Digest
public void update(byte[] in, int inOff, int len)
Digest
private byte[] P(byte[] in)
private byte[] A(byte[] in)
private void E(byte[] key, byte[] s, int sOff, byte[] in, int inOff)
private void fw(byte[] in)
protected void processBlock(byte[] in, int inOff)
private void finish()
public int doFinal(byte[] out, int outOff)
Digest
public void reset()
Digest
private void sumByteArray(byte[] in)
private void cpyBytesToShort(byte[] S, short[] wS)
private void cpyShortToBytes(short[] wS, byte[] S)
public int getByteLength()
ExtendedDigest
getByteLength
in interface ExtendedDigest