Package totalcross.crypto.digest
Class SHA256Digest
- java.lang.Object
-
- totalcross.crypto.digest.Digest
-
- totalcross.crypto.digest.SHA256Digest
-
public class SHA256Digest extends Digest
This class implements the SHA-256 message digest algorithm.
-
-
Constructor Summary
Constructors Constructor Description SHA256Digest()Creates a new SHA256Digest object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAlgorithm()Returns the name of the algorithm.intgetBlockLength()Returns the block length.intgetDigestLength()Returns the message digest length.protected byte[]process(byte[] data)
-
-
-
Constructor Detail
-
SHA256Digest
public SHA256Digest() throws NoSuchAlgorithmExceptionCreates a new SHA256Digest object.- Throws:
NoSuchAlgorithmException- If no Provider supports aMessageDigestSpiimplementation for the specified algorithm.
-
-
Method Detail
-
getAlgorithm
public final java.lang.String getAlgorithm()
Returns the name of the algorithm.- Specified by:
getAlgorithmin classDigest- Returns:
- "SHA-256".
-
getBlockLength
public final int getBlockLength()
Returns the block length.- Specified by:
getBlockLengthin classDigest- Returns:
- 64.
-
getDigestLength
public final int getDigestLength()
Returns the message digest length.- Specified by:
getDigestLengthin classDigest- Returns:
- 32.
-
-