Package org.wildfly.security.digest
Class SHA512_256MessageDigest
- java.lang.Object
-
- java.security.MessageDigestSpi
-
- org.wildfly.security.digest.SHA512_256MessageDigest
-
public class SHA512_256MessageDigest extends MessageDigestSpi
SHA-512/256 hashing implementation as defined in FIPS PUB 180-4 Secure Hash Standard
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]
block
private static int
BLOCK_SIZE
private int
bytesLoaded
private long[]
H
private static long[]
K
private long
messageLength
private byte[]
tempByte
private long[]
W
-
Constructor Summary
Constructors Constructor Description SHA512_256MessageDigest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static long
ch(long e, long f, long g)
protected byte[]
engineDigest()
protected void
engineReset()
protected void
engineUpdate(byte input)
protected void
engineUpdate(byte[] input, int offset, int len)
private static long
maj(long a, long b, long c)
private void
processBlock()
protected static void
resetH(long[] H)
protected byte[]
resultFromH(long[] H)
private static long
rotr(long x, int bits)
private static long
sigma0(long a)
private static long
sigma1(long e)
-
Methods inherited from class java.security.MessageDigestSpi
clone, engineDigest, engineGetDigestLength, engineUpdate
-
-
-
-
Field Detail
-
K
private static final long[] K
-
BLOCK_SIZE
private static final int BLOCK_SIZE
- See Also:
- Constant Field Values
-
tempByte
private final byte[] tempByte
-
H
private final long[] H
-
W
private final long[] W
-
block
private final byte[] block
-
messageLength
private long messageLength
-
bytesLoaded
private int bytesLoaded
-
-
Method Detail
-
engineReset
protected void engineReset()
- Specified by:
engineReset
in classMessageDigestSpi
-
resetH
protected static void resetH(long[] H)
-
resultFromH
protected byte[] resultFromH(long[] H)
-
engineUpdate
protected void engineUpdate(byte input)
- Specified by:
engineUpdate
in classMessageDigestSpi
-
engineUpdate
protected void engineUpdate(byte[] input, int offset, int len)
- Specified by:
engineUpdate
in classMessageDigestSpi
-
engineDigest
protected byte[] engineDigest()
- Specified by:
engineDigest
in classMessageDigestSpi
-
processBlock
private void processBlock()
-
sigma0
private static long sigma0(long a)
-
sigma1
private static long sigma1(long e)
-
ch
private static long ch(long e, long f, long g)
-
maj
private static long maj(long a, long b, long c)
-
rotr
private static long rotr(long x, int bits)
-
-