It implements java.security.MessageDigestSpi, and can be used through Java Cryptography Architecture (JCA), as a pluggable MessageDigest implementation.
| Modifier and Type | Class and Description |
|---|---|
| public static class | SHA5.
SHA-384 implementation class. |
| public static class | SHA5.
SHA-512 implementation class. |
| public static class | |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private final long[] | |
| private static final int | |
| private static final long[] | |
| private long[] | |
| private long[] |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Object | clone()
Overrides sun. Returns a clone if the implementation is cloneable. |
| pack-priv final void | implCompress(byte[] buf, int ofs)
Implements abstract sun. Compute the hash for the current block. |
| private void | |
| private void | |
| pack-priv final void | implDigest(byte[] out, int ofs)
Implements abstract sun. Return the digest. |
| pack-priv final void | implReset()
Implements abstract sun. Reset subclass specific state to their initial values. |
| private static long | Returns: (x and y) xor ((complement x) and z)long x, long long y, long long z)logical function ch(x,y,z) as defined in spec: |
| private static long | Returns: longlong x)logical function delta0(x) - xor of results of right shifts/rotations |
| private static long | Returns: longlong x)logical function delta1(x) - xor of results of right shifts/rotations |
| private static long | Returns: (x and y) xor (x and z) xor (y and z)long x, long long y, long long z)logical function maj(x,y,z) as defined in spec: |
| private static long | |
| private static long | Returns: x circular right shift for s timeslong x, int int s)logical function S(x,s) - right rotation |
| private static long | Returns: S(x,28) xor S(x,34) xor S(x,39)long x)logical function sigma0(x) - xor of results of right rotations |
| private static long | Returns: S(x,14) xor S(x,18) xor S(x,41)long x)logical function sigma1(x) - xor of results of right rotations |
| private void |
| initialHashes | back to summary |
|---|---|
| private final long[] initialHashes | |
| ITERATION | back to summary |
|---|---|
| private static final int ITERATION | |
| ROUND_CONSTS | back to summary |
|---|---|
| private static final long[] ROUND_CONSTS | |
| state | back to summary |
|---|---|
| private long[] state | |
| W | back to summary |
|---|---|
| private long[] W | |
| SHA5 | back to summary |
|---|---|
| pack-priv SHA5(String name, int digestLength, long[] initialHashes) Creates a new SHA object. | |
| clone | back to summary |
|---|---|
| public Object clone() throws CloneNotSupportedException Overrides sun. Doc from java. Returns a clone if the implementation is cloneable.
| |
| implCompress | back to summary |
|---|---|
| pack-priv final void implCompress(byte[] buf, int ofs) Implements abstract sun. Compute the hash for the current block. This is in the same vein as Peter Gutmann's algorithm listed in the back of Applied Cryptography, Compact implementation of "old" NIST Secure Hash Algorithm. | |
| implCompress0 | back to summary |
|---|---|
private void implCompress0(byte[] buf, int ofs)
| |
| implCompressCheck | back to summary |
|---|---|
| private void implCompressCheck(byte[] buf, int ofs) | |
| implDigest | back to summary |
|---|---|
| pack-priv final void implDigest(byte[] out, int ofs) Implements abstract sun. Doc from sun. Return the digest. Subclasses do not need to reset() themselves, DigestBase calls implReset() when necessary. | |
| implReset | back to summary |
|---|---|
| pack-priv final void implReset() Implements abstract sun. Doc from sun. Reset subclass specific state to their initial values. DigestBase calls this method when necessary. | |
| lf_ch | back to summary |
|---|---|
| private static long lf_ch(long x, long y, long z) logical function ch(x,y,z) as defined in spec:
| |
| lf_delta0 | back to summary |
|---|---|
| private static long lf_delta0(long x) logical function delta0(x) - xor of results of right shifts/rotations
| |
| lf_delta1 | back to summary |
|---|---|
| private static long lf_delta1(long x) logical function delta1(x) - xor of results of right shifts/rotations
| |
| lf_maj | back to summary |
|---|---|
| private static long lf_maj(long x, long y, long z) logical function maj(x,y,z) as defined in spec:
| |
| lf_R | back to summary |
|---|---|
| private static long lf_R(long x, int s) logical function R(x,s) - right shift
| |
| lf_S | back to summary |
|---|---|
| private static long lf_S(long x, int s) logical function S(x,s) - right rotation
| |
| lf_sigma0 | back to summary |
|---|---|
| private static long lf_sigma0(long x) logical function sigma0(x) - xor of results of right rotations
| |
| lf_sigma1 | back to summary |
|---|---|
| private static long lf_sigma1(long x) logical function sigma1(x) - xor of results of right rotations
| |
| resetHashes | back to summary |
|---|---|
| private void resetHashes() | |
| Modifier and Type | Field and Description |
|---|---|
| private static final long[] |
| Access | Constructor and Description |
|---|---|
| public |
| INITIAL_HASHES | back to summary |
|---|---|
| private static final long[] INITIAL_HASHES | |
| SHA384 | back to summary |
|---|---|
| public SHA384() | |
| Modifier and Type | Field and Description |
|---|---|
| private static final long[] |
| Access | Constructor and Description |
|---|---|
| public |
| INITIAL_HASHES | back to summary |
|---|---|
| private static final long[] INITIAL_HASHES | |
| SHA512 | back to summary |
|---|---|
| public SHA512() | |
| Modifier and Type | Field and Description |
|---|---|
| private static final long[] |
| Access | Constructor and Description |
|---|---|
| public |
| INITIAL_HASHES | back to summary |
|---|---|
| private static final long[] INITIAL_HASHES | |
| SHA512_224 | back to summary |
|---|---|
| public SHA512_224() | |
| Modifier and Type | Field and Description |
|---|---|
| private static final long[] |
| Access | Constructor and Description |
|---|---|
| public |
| INITIAL_HASHES | back to summary |
|---|---|
| private static final long[] INITIAL_HASHES | |
| SHA512_256 | back to summary |
|---|---|
| public SHA512_256() | |