public class SM3 extends MessageDigestSpi implements Cloneable
| 限定符和类型 | 字段和说明 |
|---|---|
private static int |
BLOCK_BYTE_SIZE |
private byte[] |
byteBuf |
private int |
byteBufOff |
private long |
byteCount |
private static int |
DIGEST_LENGTH |
private static int[] |
T |
private int[] |
V |
private int[] |
W |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
CF()
Compression Function
|
Object |
clone()
Clone
|
protected byte[] |
engineDigest() |
int |
engineGetDigestLength() |
protected void |
engineReset() |
protected void |
engineUpdate(byte input) |
protected void |
engineUpdate(byte[] input,
int offset,
int len) |
private int |
FF(int j,
int x,
int y,
int z)
Boolean function
FFj(X;Y;Z) = X XOR Y XOR Z when 0 < = j < = 15
= (X AND Y) OR (X AND Z) OR (Y AND Z) when 16 < = j < = 63
|
private int |
GG(int j,
int x,
int y,
int z)
Boolean function
GGj(X;Y;Z) = X XOR Y XOR Z when 0 < = j < = 15
= (X AND Y) OR (NOT X AND Z) when 16 < = j < = 63
|
protected void |
ME()
Message Extension
W[j] = B[i] when 0 < = j < = 15
W[j] = P1(W[j-16] XOR W[j-9] XOR (W[j-3] <<< 15)) XOR (W[j-13] <<< 7) XOR W[j-6] when 16 < = j < = 63
HINT:
In order to optimize data storage, W' in the message extension will be
directly calculated when it is used in the compression function.
|
private int |
P0(int x)
Permutation function
|
private int |
P1(int x)
Permutation function
|
protected void |
padding(long bitLength)
Padding
|
engineDigest, engineUpdateprivate static final int DIGEST_LENGTH
private static final int BLOCK_BYTE_SIZE
private long byteCount
private final byte[] byteBuf
private int byteBufOff
private final int[] V
private final int[] W
private static final int[] T
public SM3()
public SM3(SM3 t)
protected void engineUpdate(byte input)
engineUpdate 在类中 MessageDigestSpiprotected void engineUpdate(byte[] input,
int offset,
int len)
engineUpdate 在类中 MessageDigestSpiprotected byte[] engineDigest()
engineDigest 在类中 MessageDigestSpiprotected void engineReset()
engineReset 在类中 MessageDigestSpipublic int engineGetDigestLength()
private int P0(int x)
x - input numberprivate int P1(int x)
x - input numberprivate int FF(int j,
int x,
int y,
int z)
j - function indexx - Xy - Yz - Xprivate int GG(int j,
int x,
int y,
int z)
j - function indexx - Xy - Yz - Zprotected void ME()
protected void CF()
protected void padding(long bitLength)
bitLength - bit length of message lengthpublic Object clone() throws CloneNotSupportedException
clone 在类中 MessageDigestSpiCloneNotSupportedExceptionCopyright © 2024. All rights reserved.