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 | SHA2.
SHA-224 implementation class. |
| public static class | SHA2.
SHA-256 implementation class. |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private final int[] | |
| private static final int | |
| private static final int[] | |
| private int[] | |
| private int[] |
| 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 void | implCompress(byte[] buf, int ofs)
Implements abstract sun. Process the current block to update the state variable state. |
| private void | |
| private void | |
| pack-priv void | implDigest(byte[] out, int ofs)
Implements abstract sun. Return the digest. |
| protected void | implDigestFixedLengthPreprocessed(byte[] input, int inLen, byte[] output, int outOffset, int outLen)
Overrides sun. Digest block-length bytes in a single operation. |
| pack-priv void | implReset()
Implements abstract sun. Resets the buffers and hash value to start a new hash. |
| private void |
| BLOCKSIZE | back to summary |
|---|---|
| private static final int BLOCKSIZE | |
| initialHashes | back to summary |
|---|---|
| private final int[] initialHashes | |
| ITERATION | back to summary |
|---|---|
| private static final int ITERATION | |
| ROUND_CONSTS | back to summary |
|---|---|
| private static final int[] ROUND_CONSTS | |
| state | back to summary |
|---|---|
| private int[] state | |
| W | back to summary |
|---|---|
| private int[] W | |
| SHA2 | back to summary |
|---|---|
| pack-priv SHA2(String name, int digestLength, int[] 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 void implCompress(byte[] buf, int ofs) Implements abstract sun. Process the current block to update the state variable state. | |
| 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 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. | |
| implDigestFixedLengthPreprocessed | back to summary |
|---|---|
| protected void implDigestFixedLengthPreprocessed(byte[] input, int inLen, byte[] output, int outOffset, int outLen) Overrides sun. Doc from sun. Digest block-length bytes in a single operation. Subclasses are expected to override this method. It is intended for fixed-length short input where input includes padding bytes.
| |
| implReset | back to summary |
|---|---|
| pack-priv void implReset() Implements abstract sun. Resets the buffers and hash value to start a new hash. | |
| resetHashes | back to summary |
|---|---|
| private void resetHashes() | |
| Modifier and Type | Field and Description |
|---|---|
| private static final int[] |
| Access | Constructor and Description |
|---|---|
| public |
| INITIAL_HASHES | back to summary |
|---|---|
| private static final int[] INITIAL_HASHES | |
| SHA224 | back to summary |
|---|---|
| public SHA224() | |
| Modifier and Type | Field and Description |
|---|---|
| private static final int[] |
| Access | Constructor and Description |
|---|---|
| public |
| INITIAL_HASHES | back to summary |
|---|---|
| private static final int[] INITIAL_HASHES | |
| SHA256 | back to summary |
|---|---|
| public SHA256() | |