DigestUtils (Apache Commons Codec 1.22.1 API)
Description: declaration: package: org.apache.commons.codec.digest, class: DigestUtils

Package org.apache.commons.codec.digest

# Class DigestUtils

java.lang.Object
org.apache.commons.codec.digest.DigestUtils

public class DigestUtils extends Object
Operations to simplify common `MessageDigest` tasks. This class is immutable and thread-safe. However the `MessageDigest` instances it creates generally won't be.

The `MessageDigestAlgorithms` class provides constants for standard digest algorithms that can be used with the `getDigest(String)` method and other methods that require the Digest algorithm name.

Note: The class has shorthand methods for all the algorithms present as standard in Java 8. This approach requires lots of methods for each algorithm, and quickly becomes unwieldy. The following code works with all algorithms:

     import static org.apache.commons.codec.digest.MessageDigestAlgorithms.SHA_224;
     ...
     byte [] digest = new DigestUtils(SHA_224).digest(dataToDigest);
     String hdigest = new DigestUtils(SHA_224).digestAsHex(new File("pom.xml"));

See Appendix A in the Java Cryptography Architecture Reference Guide for information about standard algorithm names.

The use of SHA3-512 requires Java 9 or higher.

See Also:
  - `MessageDigestAlgorithms`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DigestUtils()`
  Deprecated.
  Since 1.11; only useful to preserve binary compatibility.
  `DigestUtils(String name)`
  Creates an instance using the provided `MessageDigest` parameter.
  `DigestUtils(MessageDigest digest)`
  Creates an instance using the provided `MessageDigest` parameter.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `byte[]`
  `digest(byte[] data)`
  Reads through a byte array and returns the digest for the data.
  `byte[]`
  `digest(File data)`
  Reads through a File and returns the digest for the data
  `byte[]`
  `digest(InputStream data)`
  Reads through an InputStream and returns the digest for the data
  `byte[]`
  `digest(String data)`
  Reads through a byte array and returns the digest for the data.
  `byte[]`
  `digest(ByteBuffer data)`
  Reads through a ByteBuffer and returns the digest for the data
  `byte[]`
  `digest(Path data, OpenOption... options)`
  Reads through a File and returns the digest for the data
  `static byte[]`
  `digest(MessageDigest messageDigest, byte[] data)`
  Reads through a byte array and returns the digest for the data.
  `static byte[]`
  `digest(MessageDigest messageDigest, File data)`
  Reads through a File and returns the digest for the data
  `static byte[]`
  `digest(MessageDigest messageDigest, InputStream data)`
  Reads through an InputStream and returns the digest for the data
  `static byte[]`
  `digest(MessageDigest messageDigest, RandomAccessFile data)`
  Reads through a RandomAccessFile using non-blocking-io (NIO) and returns the digest for the data
  `static byte[]`
  `digest(MessageDigest messageDigest, ByteBuffer data)`
  Reads through a ByteBuffer and returns the digest for the data
  `static byte[]`
  `digest(MessageDigest messageDigest, Path data, OpenOption... options)`
  Reads through a File and returns the digest for the data
  `String`
  `digestAsHex(byte[] data)`
  Reads through a byte array and returns the digest for the data.
  `String`
  `digestAsHex(File data)`
  Reads through a File and returns the digest for the data
  `String`
  `digestAsHex(InputStream data)`
  Reads through an InputStream and returns the digest for the data
  `String`
  `digestAsHex(String data)`
  Reads through a byte array and returns the digest for the data.
  `String`
  `digestAsHex(ByteBuffer data)`
  Reads through a ByteBuffer and returns the digest for the data
  `String`
  `digestAsHex(Path data, OpenOption... options)`
  Reads through a File and returns the digest for the data
  `static MessageDigest`
  `getDigest(String algorithm)`
  Gets a `MessageDigest` for the given `algorithm`.
  `static MessageDigest`
  `getDigest(String algorithm, MessageDigest defaultMessageDigest)`
  Gets a `MessageDigest` for the given `algorithm` or a default if there is a problem getting the algorithm.
  `static MessageDigest`
  `getMd2Digest()`
  Gets an MD2 MessageDigest.
  `static MessageDigest`
  `getMd5Digest()`
  Gets an MD5 MessageDigest.
  `MessageDigest`
  `getMessageDigest()`
  Returns the message digest instance.
  `static MessageDigest`
  `getSha1Digest()`
  Gets an SHA-1 digest.
  `static MessageDigest`
  `getSha256Digest()`
  Gets an SHA-256 digest.
  `static MessageDigest`
  `getSha3_224Digest()`
  Gets an SHA3-224 digest.
  `static MessageDigest`
  `getSha3_256Digest()`
  Returns an SHA3-256 digest.
  `static MessageDigest`
  `getSha3_384Digest()`
  Gets an SHA3-384 digest.
  `static MessageDigest`
  `getSha3_512Digest()`
  Gets an SHA3-512 digest.
  `static MessageDigest`
  `getSha384Digest()`
  Gets an SHA-384 digest.
  `static MessageDigest`
  `getSha512_224Digest()`
  Gets an SHA-512/224 digest.
  `static MessageDigest`
  `getSha512_256Digest()`
  Gets an SHA-512/256 digest.
  `static MessageDigest`
  `getSha512Digest()`
  Gets an SHA-512 digest.
  `static MessageDigest`
  `getShaDigest()`
  Deprecated.
  (1.11) Use `getSha1Digest()`
  `static MessageDigest`
  `getShake128_256Digest()`
  Gets an SHAKE128_256 digest.
  `static MessageDigest`
  `getShake256_512Digest()`
  Gets an SHAKE128_512 digest.
  `static boolean`
  `isAvailable(String messageDigestAlgorithm)`
  Test whether the algorithm is supported.
  `static byte[]`
  `md2(byte[] data)`
  Calculates the MD2 digest and returns the value as a 16 element `byte[]`.
  `static byte[]`
  `md2(InputStream data)`
  Calculates the MD2 digest and returns the value as a 16 element `byte[]`.
  `static byte[]`
  `md2(String data)`
  Calculates the MD2 digest and returns the value as a 16 element `byte[]`.
  `static String`
  `md2Hex(byte[] data)`
  Calculates the MD2 digest and returns the value as a 32 character hexadecimal string.
  `static String`
  `md2Hex(InputStream data)`
  Calculates the MD2 digest and returns the value as a 32 character hexadecimal string.
  `static String`
  `md2Hex(String data)`
  Calculates the MD2 digest and returns the value as a 32 character hexadecimal string.
  `static byte[]`
  `md5(byte[] data)`
  Calculates the MD5 digest and returns the value as a 16 element `byte[]`.
  `static byte[]`
  `md5(InputStream data)`
  Calculates the MD5 digest and returns the value as a 16 element `byte[]`.
  `static byte[]`
  `md5(String data)`
  Calculates the MD5 digest and returns the value as a 16 element `byte[]`.
  `static String`
  `md5Hex(byte[] data)`
  Calculates the MD5 digest and returns the value as a 32 character hexadecimal string.
  `static String`
  `md5Hex(InputStream data)`
  Calculates the MD5 digest and returns the value as a 32 character hexadecimal string.
  `static String`
  `md5Hex(String data)`
  Calculates the MD5 digest and returns the value as a 32 character hexadecimal string.
  `static byte[]`
  `sha(byte[] data)`
  Deprecated.
  (1.11) Use `sha1(byte[])`
  `static byte[]`
  `sha(InputStream data)`
  Deprecated.
  (1.11) Use `sha1(InputStream)`
  `static byte[]`
  `sha(String data)`
  Deprecated.
  (1.11) Use `sha1(String)`
  `static byte[]`
  `sha1(byte[] data)`
  Calculates the SHA-1 digest and returns the value as a `byte[]`.
  `static byte[]`
  `sha1(InputStream data)`
  Calculates the SHA-1 digest and returns the value as a `byte[]`.
  `static byte[]`
  `sha1(String data)`
  Calculates the SHA-1 digest and returns the value as a `byte[]`.
  `static String`
  `sha1Hex(byte[] data)`
  Calculates the SHA-1 digest and returns the value as a hexadecimal string.
  `static String`
  `sha1Hex(InputStream data)`
  Calculates the SHA-1 digest and returns the value as a hexadecimal string.
  `static String`
  `sha1Hex(String data)`
  Calculates the SHA-1 digest and returns the value as a hexadecimal string.
  `static byte[]`
  `sha256(byte[] data)`
  Calculates the SHA-256 digest and returns the value as a `byte[]`.
  `static byte[]`
  `sha256(InputStream data)`
  Calculates the SHA-256 digest and returns the value as a `byte[]`.
  `static byte[]`
  `sha256(String data)`
  Calculates the SHA-256 digest and returns the value as a `byte[]`.
  `static String`
  `sha256Hex(byte[] data)`
  Calculates the SHA-256 digest and returns the value as a hexadecimal string.
  `static String`
  `sha256Hex(InputStream data)`
  Calculates the SHA-256 digest and returns the value as a hexadecimal string.
  `static String`
  `sha256Hex(String data)`
  Calculates the SHA-256 digest and returns the value as a hexadecimal string.
  `static byte[]`
  `sha3_224(byte[] data)`
  Calculates the SHA3-224 digest and returns the value as a `byte[]`.
  `static byte[]`
  `sha3_224(InputStream data)`
  Calculates the SHA3-224 digest and returns the value as a `byte[]`.
  `static byte[]`
  `sha3_224(String data)`
  Calculates the SHA3-224 digest and returns the value as a `byte[]`.
  `static String`
  `sha3_224Hex(byte[] data)`
  Calculates the SHA3-224 digest and returns the value as a hexadecimal string.
  `static String`
  `sha3_224Hex(InputStream data)`
  Calculates the SHA3-224 digest and returns the value as a hexadecimal string.
  `static String`
  `sha3_224Hex(String data)`
  Calculates the SHA3-224 digest and returns the value as a hexadecimal string.
  `static byte[]`
  `sha3_256(byte[] data)`
  Calculates the SHA3-256 digest and returns the value as a `byte[]`.
  `static byte[]`
  `sha3_256(InputStream data)`
  Calculates the SHA3-256 digest and returns the value as a `byte[]`.
  `static byte[]`
  `sha3_256(String data)`
  Calculates the SHA3-256 digest and returns the value as a `byte[]`.
  `static String`
  `sha3_256Hex(byte[] data)`
  Calculates the SHA3-256 digest and returns the value as a hexadecimal string.
  `static String`
  `sha3_256Hex(InputStream data)`
  Calculates the SHA3-256 digest and returns the value as a hexadecimal string.
  `static String`
  `sha3_256Hex(String data)`
  Calculates the SHA3-256 digest and returns the value as a hexadecimal string.
  `static byte[]`
  `sha3_384(byte[] data)`
  Calculates the SHA3-384 digest and returns the value as a `byte[]`.
  `static byte[]`
  `sha3_384(InputStream data)`
  Calculates the SHA3-384 digest and returns the value as a `byte[]`.
  `static byte[]`
  `sha3_384(String data)`
  Calculates the SHA3-384 digest and returns the value as a `byte[]`.
  `static String`
  `sha3_384Hex(byte[] data)`
  Calculates the SHA3-384 digest and returns the value as a hexadecimal string.
  `static String`
  `sha3_384Hex(InputStream data)`
  Calculates the SHA3-384 digest and returns the value as a hexadecimal string.
  `static String`
  `sha3_384Hex(String data)`
  Calculates the SHA3-384 digest and returns the value as a hexadecimal string.
  `static byte[]`
  `sha3_512(byte[] data)`
  Calculates the SHA3-512 digest and returns the value as a `byte[]`.
  `static byte[]`
  `sha3_512(InputStream data)`
  Calculates the SHA3-512 digest and returns the value as a `byte[]`.
  `static byte[]`
  `sha3_512(String data)`
  Calculates the SHA3-512 digest and returns the value as a `byte[]`.
  `static String`
  `sha3_512Hex(byte[] data)`
  Calculates the SHA3-512 digest and returns the value as a hexadecimal string.
  `static String`
  `sha3_512Hex(InputStream data)`
  Calculates the SHA3-512 digest and returns the value as a hexadecimal string.
  `static String`
  `sha3_512Hex(String data)`
  Calculates the SHA3-512 digest and returns the value as a hexadecimal string.
  `static byte[]`
  `sha384(byte[] data)`
  Calculates the SHA-384 digest and returns the value as a `byte[]`.
  `static byte[]`
  `sha384(InputStream data)`
  Calculates the SHA-384 digest and returns the value as a `byte[]`.
  `static byte[]`
  `sha384(String data)`
  Calculates the SHA-384 digest and returns the value as a `byte[]`.
  `static String`
  `sha384Hex(byte[] data)`
  Calculates the SHA-384 digest and returns the value as a hexadecimal string.
  `static String`
  `sha384Hex(InputStream data)`
  Calculates the SHA-384 digest and returns the value as a hexadecimal string.
  `static String`
  `sha384Hex(String data)`
  Calculates the SHA-384 digest and returns the value as a hexadecimal string.
  `static byte[]`
  `sha512(byte[] data)`
  Calculates the SHA-512 digest and returns the value as a `byte[]`.
  `static byte[]`
  `sha512(InputStream data)`
  Calculates the SHA-512 digest and returns the value as a `byte[]`.
  `static byte[]`
  `sha512(String data)`
  Calculates the SHA-512 digest and returns the value as a `byte[]`.
  `static byte[]`
  `sha512_224(byte[] data)`
  Calculates the SHA-512/224 digest and returns the value as a `byte[]`.
  `static byte[]`
  `sha512_224(InputStream data)`
  Calculates the SHA-512/224 digest and returns the value as a `byte[]`.
  `static byte[]`
  `sha512_224(String data)`
  Calculates the SHA-512/224 digest and returns the value as a `byte[]`.
  `static String`
  `sha512_224Hex(byte[] data)`
  Calculates the SHA-512/224 digest and returns the value as a hexadecimal string.
  `static String`
  `sha512_224Hex(InputStream data)`
  Calculates the SHA-512/224 digest and returns the value as a hexadecimal string.
  `static String`
  `sha512_224Hex(String data)`
  Calculates the SHA-512/224 digest and returns the value as a hexadecimal string.
  `static byte[]`
  `sha512_256(byte[] data)`
  Calculates the SHA-512/256 digest and returns the value as a `byte[]`.
  `static byte[]`
  `sha512_256(InputStream data)`
  Calculates the SHA-512/256 digest and returns the value as a `byte[]`.
  `static byte[]`
  `sha512_256(String data)`
  Calculates the SHA-512/256 digest and returns the value as a `byte[]`.
  `static String`
  `sha512_256Hex(byte[] data)`
  Calculates the SHA-512/256 digest and returns the value as a hexadecimal string.
  `static String`
  `sha512_256Hex(InputStream data)`
  Calculates the SHA-512/256 digest and returns the value as a hexadecimal string.
  `static String`
  `sha512_256Hex(String data)`
  Calculates the SHA-512/256 digest and returns the value as a hexadecimal string.
  `static String`
  `sha512Hex(byte[] data)`
  Calculates the SHA-512 digest and returns the value as a hexadecimal string.
  `static String`
  `sha512Hex(InputStream data)`
  Calculates the SHA-512 digest and returns the value as a hexadecimal string.
  `static String`
  `sha512Hex(String data)`
  Calculates the SHA-512 digest and returns the value as a hexadecimal string.
  `static String`
  `shaHex(byte[] data)`
  Deprecated.
  (1.11) Use `sha1Hex(byte[])`
  `static String`
  `shaHex(InputStream data)`
  Deprecated.
  (1.11) Use `sha1Hex(InputStream)`
  `static String`
  `shaHex(String data)`
  Deprecated.
  (1.11) Use `sha1Hex(String)`
  `static byte[]`
  `shake128_256(byte[] data)`
  Calculates the SHAKE128-256 digest and returns the value as a `byte[]`.
  `static byte[]`
  `shake128_256(InputStream data)`
  Calculates the SHAKE128-256 digest and returns the value as a `byte[]`.
  `static byte[]`
  `shake128_256(String data)`
  Calculates the SHAKE128-256 digest and returns the value as a `byte[]`.
  `static String`
  `shake128_256Hex(byte[] data)`
  Calculates the SHAKE128-256 digest and returns the value as a hexadecimal string.
  `static String`
  `shake128_256Hex(InputStream data)`
  Calculates the SHAKE128-256 digest and returns the value as a hexadecimal string.
  `static String`
  `shake128_256Hex(String data)`
  Calculates the SHAKE128-256 digest and returns the value as a hexadecimal string.
  `static byte[]`
  `shake256_512(byte[] data)`
  Calculates the SHAKE256-512 digest and returns the value as a `byte[]`.
  `static byte[]`
  `shake256_512(InputStream data)`
  Calculates the SHAKE256-512 digest and returns the value as a `byte[]`.
  `static byte[]`
  `shake256_512(String data)`
  Calculates the SHAKE256-512 digest and returns the value as a `byte[]`.
  `static String`
  `shake256_512Hex(byte[] data)`
  Calculates the SHAKE256-512 digest and returns the value as a hexadecimal string.
  `static String`
  `shake256_512Hex(InputStream data)`
  Calculates the SHAKE256-512 digest and returns the value as a hexadecimal string.
  `static String`
  `shake256_512Hex(String data)`
  Calculates the SHAKE256-512 digest and returns the value as a hexadecimal string.
  `static MessageDigest`
  `updateDigest(MessageDigest messageDigest, byte[] valueToDigest)`
  Updates the given `MessageDigest`.
  `static MessageDigest`
  `updateDigest(MessageDigest digest, File data)`
  Reads through a File and updates the digest for the data
  `static MessageDigest`
  `updateDigest(MessageDigest digest, InputStream inputStream)`
  Reads through an InputStream and updates the digest for the data
  `static MessageDigest`
  `updateDigest(MessageDigest digest, RandomAccessFile data)`
  Reads through a RandomAccessFile and updates the digest for the data using non-blocking-io (NIO)
  `static MessageDigest`
  `updateDigest(MessageDigest messageDigest, String valueToDigest)`
  Updates the given `MessageDigest` from a String (converted to bytes using UTF-8).
  `static MessageDigest`
  `updateDigest(MessageDigest messageDigest, ByteBuffer valueToDigest)`
  Updates the given `MessageDigest`.
  `static MessageDigest`
  `updateDigest(MessageDigest digest, Path path, OpenOption... options)`
  Reads through a Path and updates the digest for the data

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DigestUtils

    @Deprecated public DigestUtils()
    Deprecated.
    Since 1.11; only useful to preserve binary compatibility.
    Preserves binary compatibility only. As for previous versions does not provide useful behavior

  - ### DigestUtils

    public DigestUtils(MessageDigest digest)
    Creates an instance using the provided `MessageDigest` parameter. This can then be used to create digests using methods such as `digest(byte[])` and `digestAsHex(File)`.
    Parameters:
      `digest` - The `MessageDigest` to use.
    Since:
      1.11

  - ### DigestUtils

    public DigestUtils(String name)
    Creates an instance using the provided `MessageDigest` parameter. This can then be used to create digests using methods such as `digest(byte[])` and `digestAsHex(File)`.
    Parameters:
      `name` - The name of the `MessageDigest` to use.
    Throws:
      `IllegalArgumentException` - Thrown if a `NoSuchAlgorithmException` is caught.
    Since:
      1.11
    See Also:
      - `getDigest(String)`

- ## Method Details

  - ### digest

    public static byte[] digest(MessageDigest messageDigest, byte[] data)
    Reads through a byte array and returns the digest for the data. Provided for symmetry with other methods.
    Parameters:
      `messageDigest` - The MessageDigest to use (for example MD5).
      `data` - Data to digest.
    Returns:
      The digest.
    Since:
      1.11

  - ### digest

    public static byte[] digest(MessageDigest messageDigest, ByteBuffer data)
    Reads through a ByteBuffer and returns the digest for the data
    Parameters:
      `messageDigest` - The MessageDigest to use (for example MD5).
      `data` - Data to digest.
    Returns:
      The digest.
    Since:
      1.11

  - ### digest

    public static byte[] digest(MessageDigest messageDigest, File data) throws IOException
    Reads through a File and returns the digest for the data
    Parameters:
      `messageDigest` - The MessageDigest to use (for example MD5).
      `data` - Data to digest.
    Returns:
      The digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.11

  - ### digest

    public static byte[] digest(MessageDigest messageDigest, InputStream data) throws IOException
    Reads through an InputStream and returns the digest for the data
    Parameters:
      `messageDigest` - The MessageDigest to use (for example MD5).
      `data` - Data to digest.
    Returns:
      The digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.11 (was private)

  - ### digest

    public static byte[] digest(MessageDigest messageDigest, Path data, OpenOption... options) throws IOException
    Reads through a File and returns the digest for the data
    Parameters:
      `messageDigest` - The MessageDigest to use (for example MD5).
      `data` - Data to digest.
      `options` - options How to open the file.
    Returns:
      The digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.14

  - ### digest

    public static byte[] digest(MessageDigest messageDigest, RandomAccessFile data) throws IOException
    Reads through a RandomAccessFile using non-blocking-io (NIO) and returns the digest for the data
    Parameters:
      `messageDigest` - The MessageDigest to use (for example MD5).
      `data` - Data to digest.
    Returns:
      The digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.14

  - ### getDigest

    public static MessageDigest getDigest(String algorithm)
    Gets a `MessageDigest` for the given `algorithm`.
    Parameters:
      `algorithm` - The name of the algorithm requested. See Appendix A in the Java Cryptography Architecture Reference Guide for information about standard algorithm names.
    Returns:
      A digest instance.
    Throws:
      `IllegalArgumentException` - Thrown if a `NoSuchAlgorithmException` is caught.
    See Also:
      - `MessageDigest.getInstance(String)`

  - ### getDigest

    public static MessageDigest getDigest(String algorithm, MessageDigest defaultMessageDigest)
    Gets a `MessageDigest` for the given `algorithm` or a default if there is a problem getting the algorithm.
    Parameters:
      `algorithm` - The name of the algorithm requested. See Appendix A in the Java Cryptography Architecture Reference Guide for information about standard algorithm names.
      `defaultMessageDigest` - The default MessageDigest.
    Returns:
      A digest instance.
    Throws:
      `IllegalArgumentException` - Thrown if a `NoSuchAlgorithmException` is caught.
    Since:
      1.11
    See Also:
      - `MessageDigest.getInstance(String)`

  - ### getMd2Digest

    public static MessageDigest getMd2Digest()
    Gets an MD2 MessageDigest.
    Returns:
      An MD2 digest instance.
    Throws:
      `IllegalArgumentException` - Thrown if a `NoSuchAlgorithmException` is caught, which should never happen because MD2 is a built-in algorithm.
    Since:
      1.7
    See Also:
      - `MessageDigestAlgorithms.MD2`

  - ### getMd5Digest

    public static MessageDigest getMd5Digest()
    Gets an MD5 MessageDigest.
    Returns:
      An MD5 digest instance.
    Throws:
      `IllegalArgumentException` - Thrown if a `NoSuchAlgorithmException` is caught, which should never happen because MD5 is a built-in algorithm.
    See Also:
      - `MessageDigestAlgorithms.MD5`

  - ### getSha1Digest

    public static MessageDigest getSha1Digest()
    Gets an SHA-1 digest.
    Returns:
      An SHA-1 digest instance.
    Throws:
      `IllegalArgumentException` - Thrown if a `NoSuchAlgorithmException` is caught, which should never happen because SHA-1 is a built-in algorithm.
    Since:
      1.7
    See Also:
      - `MessageDigestAlgorithms.SHA_1`

  - ### getSha256Digest

    public static MessageDigest getSha256Digest()
    Gets an SHA-256 digest.
    Returns:
      An SHA-256 digest instance.
    Throws:
      `IllegalArgumentException` - Thrown if a `NoSuchAlgorithmException` is caught, which should never happen because SHA-256 is a built-in algorithm.
    See Also:
      - `MessageDigestAlgorithms.SHA_256`

  - ### getSha3_224Digest

    public static MessageDigest getSha3_224Digest()
    Gets an SHA3-224 digest.
    Returns:
      An SHA3-224 digest instance.
    Throws:
      `IllegalArgumentException` - Thrown if a `NoSuchAlgorithmException` is caught, which should not happen on Oracle Java 9 and greater.
    Since:
      1.12
    See Also:
      - `MessageDigestAlgorithms.SHA3_224`

  - ### getSha3_256Digest

    public static MessageDigest getSha3_256Digest()
    Returns an SHA3-256 digest.
    Returns:
      An SHA3-256 digest instance.
    Throws:
      `IllegalArgumentException` - Thrown if a `NoSuchAlgorithmException` is caught, which should not happen on Oracle Java 9 and greater.
    Since:
      1.12
    See Also:
      - `MessageDigestAlgorithms.SHA3_256`

  - ### getSha3_384Digest

    public static MessageDigest getSha3_384Digest()
    Gets an SHA3-384 digest.
    Returns:
      An SHA3-384 digest instance.
    Throws:
      `IllegalArgumentException` - Thrown if a `NoSuchAlgorithmException` is caught, which should not happen on Oracle Java 9 and greater.
    Since:
      1.12
    See Also:
      - `MessageDigestAlgorithms.SHA3_384`

  - ### getSha3_512Digest

    public static MessageDigest getSha3_512Digest()
    Gets an SHA3-512 digest.
    Returns:
      An SHA3-512 digest instance.
    Throws:
      `IllegalArgumentException` - Thrown if a `NoSuchAlgorithmException` is caught, which should not happen on Oracle Java 9 and greater.
    Since:
      1.12
    See Also:
      - `MessageDigestAlgorithms.SHA3_512`

  - ### getSha384Digest

    public static MessageDigest getSha384Digest()
    Gets an SHA-384 digest.
    Returns:
      An SHA-384 digest instance.
    Throws:
      `IllegalArgumentException` - Thrown if a `NoSuchAlgorithmException` is caught, which should never happen because SHA-384 is a built-in algorithm.
    See Also:
      - `MessageDigestAlgorithms.SHA_384`

  - ### getSha512_224Digest

    public static MessageDigest getSha512_224Digest()
    Gets an SHA-512/224 digest.
    Returns:
      An SHA-512/224 digest instance.
    Throws:
      `IllegalArgumentException` - Thrown if a `NoSuchAlgorithmException` is caught.
    See Also:
      - `MessageDigestAlgorithms.SHA_512_224`

  - ### getSha512_256Digest

    public static MessageDigest getSha512_256Digest()
    Gets an SHA-512/256 digest.
    Returns:
      An SHA-512/256 digest instance.
    Throws:
      `IllegalArgumentException` - Thrown if a `NoSuchAlgorithmException` is caught.
    See Also:
      - `MessageDigestAlgorithms.SHA_512_224`

  - ### getSha512Digest

    public static MessageDigest getSha512Digest()
    Gets an SHA-512 digest.
    Returns:
      An SHA-512 digest instance.
    Throws:
      `IllegalArgumentException` - Thrown if a `NoSuchAlgorithmException` is caught, which should never happen because SHA-512 is a built-in algorithm.
    See Also:
      - `MessageDigestAlgorithms.SHA_512`

  - ### getShaDigest

    @Deprecated public static MessageDigest getShaDigest()
    Deprecated.
    (1.11) Use `getSha1Digest()`
    Gets an SHA-1 digest.
    Returns:
      An SHA-1 digest instance.
    Throws:
      `IllegalArgumentException` - Thrown if a `NoSuchAlgorithmException` is caught.

  - ### getShake128_256Digest

    public static MessageDigest getShake128_256Digest()
    Gets an SHAKE128_256 digest.
    Returns:
      An SHAKE128_256 digest instance.
    Throws:
      `IllegalArgumentException` - Thrown if a `NoSuchAlgorithmException` is caught, which should not happen on Oracle Java 25 and greater.
    Since:
      1.20.0
    See Also:
      - `MessageDigestAlgorithms.SHAKE128_256`
      - Java 25 Cryptography Architecture Standard Algorithm Name Documentation
      - FIPS PUB 202 - SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions

  - ### getShake256_512Digest

    public static MessageDigest getShake256_512Digest()
    Gets an SHAKE128_512 digest.
    Returns:
      An SHAKE128_512 digest instance.
    Throws:
      `IllegalArgumentException` - Thrown if a `NoSuchAlgorithmException` is caught, which should not happen on Oracle Java 25 and greater.
    Since:
      1.20.0
    See Also:
      - `MessageDigestAlgorithms.SHAKE256_512`
      - Java 25 Cryptography Architecture Standard Algorithm Name Documentation
      - FIPS PUB 202 - SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions

  - ### isAvailable

    public static boolean isAvailable(String messageDigestAlgorithm)
    Test whether the algorithm is supported.
    Parameters:
      `messageDigestAlgorithm` - The algorithm name.
    Returns:
      `true` if the algorithm can be found.
    Since:
      1.11

  - ### md2

    public static byte[] md2(byte[] data)
    Calculates the MD2 digest and returns the value as a 16 element `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      MD2 digest.
    Since:
      1.7

  - ### md2

    public static byte[] md2(InputStream data) throws IOException
    Calculates the MD2 digest and returns the value as a 16 element `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      MD2 digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.7

  - ### md2

    public static byte[] md2(String data)
    Calculates the MD2 digest and returns the value as a 16 element `byte[]`.
    Parameters:
      `data` - Data to digest; converted to bytes using `StringUtils.getBytesUtf8(String)`.
    Returns:
      MD2 digest.
    Since:
      1.7

  - ### md2Hex

    public static String md2Hex(byte[] data)
    Calculates the MD2 digest and returns the value as a 32 character hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      MD2 digest as a hexadecimal string.
    Since:
      1.7

  - ### md2Hex

    public static String md2Hex(InputStream data) throws IOException
    Calculates the MD2 digest and returns the value as a 32 character hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      MD2 digest as a hexadecimal string.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.7

  - ### md2Hex

    public static String md2Hex(String data)
    Calculates the MD2 digest and returns the value as a 32 character hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      MD2 digest as a hexadecimal string.
    Since:
      1.7

  - ### md5

    public static byte[] md5(byte[] data)
    Calculates the MD5 digest and returns the value as a 16 element `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      MD5 digest.

  - ### md5

    public static byte[] md5(InputStream data) throws IOException
    Calculates the MD5 digest and returns the value as a 16 element `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      MD5 digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.4

  - ### md5

    public static byte[] md5(String data)
    Calculates the MD5 digest and returns the value as a 16 element `byte[]`.
    Parameters:
      `data` - Data to digest; converted to bytes using `StringUtils.getBytesUtf8(String)`.
    Returns:
      MD5 digest.

  - ### md5Hex

    public static String md5Hex(byte[] data)
    Calculates the MD5 digest and returns the value as a 32 character hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      MD5 digest as a hexadecimal string.

  - ### md5Hex

    public static String md5Hex(InputStream data) throws IOException
    Calculates the MD5 digest and returns the value as a 32 character hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      MD5 digest as a hexadecimal string.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.4

  - ### md5Hex

    public static String md5Hex(String data)
    Calculates the MD5 digest and returns the value as a 32 character hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      MD5 digest as a hexadecimal string.

  - ### sha

    @Deprecated public static byte[] sha(byte[] data)
    Deprecated.
    (1.11) Use `sha1(byte[])`
    Calculates the SHA-1 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-1 digest.

  - ### sha

    @Deprecated public static byte[] sha(InputStream data) throws IOException
    Deprecated.
    (1.11) Use `sha1(InputStream)`
    Calculates the SHA-1 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-1 digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.4

  - ### sha

    @Deprecated public static byte[] sha(String data)
    Deprecated.
    (1.11) Use `sha1(String)`
    Calculates the SHA-1 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-1 digest.

  - ### sha1

    public static byte[] sha1(byte[] data)
    Calculates the SHA-1 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-1 digest.
    Since:
      1.7

  - ### sha1

    public static byte[] sha1(InputStream data) throws IOException
    Calculates the SHA-1 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-1 digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.7

  - ### sha1

    public static byte[] sha1(String data)
    Calculates the SHA-1 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest; converted to bytes using `StringUtils.getBytesUtf8(String)`.
    Returns:
      SHA-1 digest.

  - ### sha1Hex

    public static String sha1Hex(byte[] data)
    Calculates the SHA-1 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-1 digest as a hexadecimal string.
    Since:
      1.7

  - ### sha1Hex

    public static String sha1Hex(InputStream data) throws IOException
    Calculates the SHA-1 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-1 digest as a hexadecimal string.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.7

  - ### sha1Hex

    public static String sha1Hex(String data)
    Calculates the SHA-1 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-1 digest as a hexadecimal string.
    Since:
      1.7

  - ### sha256

    public static byte[] sha256(byte[] data)
    Calculates the SHA-256 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-256 digest.
    Since:
      1.4

  - ### sha256

    public static byte[] sha256(InputStream data) throws IOException
    Calculates the SHA-256 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-256 digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.4

  - ### sha256

    public static byte[] sha256(String data)
    Calculates the SHA-256 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest; converted to bytes using `StringUtils.getBytesUtf8(String)`.
    Returns:
      SHA-256 digest.
    Since:
      1.4

  - ### sha256Hex

    public static String sha256Hex(byte[] data)
    Calculates the SHA-256 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-256 digest as a hexadecimal string.
    Since:
      1.4

  - ### sha256Hex

    public static String sha256Hex(InputStream data) throws IOException
    Calculates the SHA-256 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-256 digest as a hexadecimal string.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.4

  - ### sha256Hex

    public static String sha256Hex(String data)
    Calculates the SHA-256 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-256 digest as a hexadecimal string.
    Since:
      1.4

  - ### sha3_224

    public static byte[] sha3_224(byte[] data)
    Calculates the SHA3-224 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA3-224 digest.
    Since:
      1.12

  - ### sha3_224

    public static byte[] sha3_224(InputStream data) throws IOException
    Calculates the SHA3-224 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA3-224 digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.12

  - ### sha3_224

    public static byte[] sha3_224(String data)
    Calculates the SHA3-224 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest; converted to bytes using `StringUtils.getBytesUtf8(String)`.
    Returns:
      SHA3-224 digest.
    Since:
      1.12

  - ### sha3_224Hex

    public static String sha3_224Hex(byte[] data)
    Calculates the SHA3-224 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA3-224 digest as a hexadecimal string.
    Since:
      1.12

  - ### sha3_224Hex

    public static String sha3_224Hex(InputStream data) throws IOException
    Calculates the SHA3-224 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA3-224 digest as a hexadecimal string.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.12

  - ### sha3_224Hex

    public static String sha3_224Hex(String data)
    Calculates the SHA3-224 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA3-224 digest as a hexadecimal string.
    Since:
      1.12

  - ### sha3_256

    public static byte[] sha3_256(byte[] data)
    Calculates the SHA3-256 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA3-256 digest.
    Since:
      1.12

  - ### sha3_256

    public static byte[] sha3_256(InputStream data) throws IOException
    Calculates the SHA3-256 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA3-256 digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.12

  - ### sha3_256

    public static byte[] sha3_256(String data)
    Calculates the SHA3-256 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest; converted to bytes using `StringUtils.getBytesUtf8(String)`.
    Returns:
      SHA3-256 digest.
    Since:
      1.12

  - ### sha3_256Hex

    public static String sha3_256Hex(byte[] data)
    Calculates the SHA3-256 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA3-256 digest as a hexadecimal string.
    Since:
      1.12

  - ### sha3_256Hex

    public static String sha3_256Hex(InputStream data) throws IOException
    Calculates the SHA3-256 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA3-256 digest as a hexadecimal string.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.12

  - ### sha3_256Hex

    public static String sha3_256Hex(String data)
    Calculates the SHA3-256 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA3-256 digest as a hexadecimal string.
    Since:
      1.12

  - ### sha3_384

    public static byte[] sha3_384(byte[] data)
    Calculates the SHA3-384 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA3-384 digest.
    Since:
      1.12

  - ### sha3_384

    public static byte[] sha3_384(InputStream data) throws IOException
    Calculates the SHA3-384 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA3-384 digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.12

  - ### sha3_384

    public static byte[] sha3_384(String data)
    Calculates the SHA3-384 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest; converted to bytes using `StringUtils.getBytesUtf8(String)`.
    Returns:
      SHA3-384 digest.
    Since:
      1.12

  - ### sha3_384Hex

    public static String sha3_384Hex(byte[] data)
    Calculates the SHA3-384 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA3-384 digest as a hexadecimal string.
    Since:
      1.12

  - ### sha3_384Hex

    public static String sha3_384Hex(InputStream data) throws IOException
    Calculates the SHA3-384 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA3-384 digest as a hexadecimal string.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.12

  - ### sha3_384Hex

    public static String sha3_384Hex(String data)
    Calculates the SHA3-384 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA3-384 digest as a hexadecimal string.
    Since:
      1.12

  - ### sha3_512

    public static byte[] sha3_512(byte[] data)
    Calculates the SHA3-512 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA3-512 digest.
    Since:
      1.12

  - ### sha3_512

    public static byte[] sha3_512(InputStream data) throws IOException
    Calculates the SHA3-512 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA3-512 digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.12

  - ### sha3_512

    public static byte[] sha3_512(String data)
    Calculates the SHA3-512 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest; converted to bytes using `StringUtils.getBytesUtf8(String)`.
    Returns:
      SHA3-512 digest.
    Since:
      1.12

  - ### sha3_512Hex

    public static String sha3_512Hex(byte[] data)
    Calculates the SHA3-512 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA3-512 digest as a hexadecimal string.
    Since:
      1.12

  - ### sha3_512Hex

    public static String sha3_512Hex(InputStream data) throws IOException
    Calculates the SHA3-512 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA3-512 digest as a hexadecimal string.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.12

  - ### sha3_512Hex

    public static String sha3_512Hex(String data)
    Calculates the SHA3-512 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA3-512 digest as a hexadecimal string.
    Since:
      1.12

  - ### sha384

    public static byte[] sha384(byte[] data)
    Calculates the SHA-384 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-384 digest.
    Since:
      1.4

  - ### sha384

    public static byte[] sha384(InputStream data) throws IOException
    Calculates the SHA-384 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-384 digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.4

  - ### sha384

    public static byte[] sha384(String data)
    Calculates the SHA-384 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest; converted to bytes using `StringUtils.getBytesUtf8(String)`.
    Returns:
      SHA-384 digest.
    Since:
      1.4

  - ### sha384Hex

    public static String sha384Hex(byte[] data)
    Calculates the SHA-384 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-384 digest as a hexadecimal string.
    Since:
      1.4

  - ### sha384Hex

    public static String sha384Hex(InputStream data) throws IOException
    Calculates the SHA-384 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-384 digest as a hexadecimal string.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.4

  - ### sha384Hex

    public static String sha384Hex(String data)
    Calculates the SHA-384 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-384 digest as a hexadecimal string.
    Since:
      1.4

  - ### sha512

    public static byte[] sha512(byte[] data)
    Calculates the SHA-512 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-512 digest.
    Since:
      1.4

  - ### sha512

    public static byte[] sha512(InputStream data) throws IOException
    Calculates the SHA-512 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-512 digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.4

  - ### sha512

    public static byte[] sha512(String data)
    Calculates the SHA-512 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest; converted to bytes using `StringUtils.getBytesUtf8(String)`.
    Returns:
      SHA-512 digest.
    Since:
      1.4

  - ### sha512_224

    public static byte[] sha512_224(byte[] data)
    Calculates the SHA-512/224 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-512/224 digest.
    Since:
      1.14

  - ### sha512_224

    public static byte[] sha512_224(InputStream data) throws IOException
    Calculates the SHA-512/224 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-512/224 digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.14

  - ### sha512_224

    public static byte[] sha512_224(String data)
    Calculates the SHA-512/224 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest; converted to bytes using `StringUtils.getBytesUtf8(String)`.
    Returns:
      SHA-512/224 digest.
    Since:
      1.14

  - ### sha512_224Hex

    public static String sha512_224Hex(byte[] data)
    Calculates the SHA-512/224 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-512/224 digest as a hexadecimal string.
    Since:
      1.14

  - ### sha512_224Hex

    public static String sha512_224Hex(InputStream data) throws IOException
    Calculates the SHA-512/224 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-512/224 digest as a hexadecimal string.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.14

  - ### sha512_224Hex

    public static String sha512_224Hex(String data)
    Calculates the SHA-512/224 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-512/224 digest as a hexadecimal string.
    Since:
      1.14

  - ### sha512_256

    public static byte[] sha512_256(byte[] data)
    Calculates the SHA-512/256 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-512/256 digest.
    Since:
      1.14

  - ### sha512_256

    public static byte[] sha512_256(InputStream data) throws IOException
    Calculates the SHA-512/256 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-512/256 digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.14

  - ### sha512_256

    public static byte[] sha512_256(String data)
    Calculates the SHA-512/256 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest; converted to bytes using `StringUtils.getBytesUtf8(String)`.
    Returns:
      SHA-512/224 digest.
    Since:
      1.14

  - ### sha512_256Hex

    public static String sha512_256Hex(byte[] data)
    Calculates the SHA-512/256 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-512/256 digest as a hexadecimal string.
    Since:
      1.14

  - ### sha512_256Hex

    public static String sha512_256Hex(InputStream data) throws IOException
    Calculates the SHA-512/256 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-512/256 digest as a hexadecimal string.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.14

  - ### sha512_256Hex

    public static String sha512_256Hex(String data)
    Calculates the SHA-512/256 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-512/256 digest as a hexadecimal string.
    Since:
      1.14

  - ### sha512Hex

    public static String sha512Hex(byte[] data)
    Calculates the SHA-512 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-512 digest as a hexadecimal string.
    Since:
      1.4

  - ### sha512Hex

    public static String sha512Hex(InputStream data) throws IOException
    Calculates the SHA-512 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-512 digest as a hexadecimal string.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.4

  - ### sha512Hex

    public static String sha512Hex(String data)
    Calculates the SHA-512 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-512 digest as a hexadecimal string.
    Since:
      1.4

  - ### shaHex

    @Deprecated public static String shaHex(byte[] data)
    Deprecated.
    (1.11) Use `sha1Hex(byte[])`
    Calculates the SHA-1 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-1 digest as a hexadecimal string.

  - ### shaHex

    @Deprecated public static String shaHex(InputStream data) throws IOException
    Deprecated.
    (1.11) Use `sha1Hex(InputStream)`
    Calculates the SHA-1 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-1 digest as a hexadecimal string.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.4

  - ### shaHex

    @Deprecated public static String shaHex(String data)
    Deprecated.
    (1.11) Use `sha1Hex(String)`
    Calculates the SHA-1 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHA-1 digest as a hexadecimal string.

  - ### shake128_256

    public static byte[] shake128_256(byte[] data)
    Calculates the SHAKE128-256 digest and returns the value as a `byte[]`.

    SHAKE128-256 produces a 256 bit digest.

    Parameters:
      `data` - Data to digest.
    Returns:
      A 256 bit SHAKE128-256 digest.
    Since:
      1.20.0

  - ### shake128_256

    public static byte[] shake128_256(InputStream data) throws IOException
    Calculates the SHAKE128-256 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      A 256 bit SHAKE128-256 digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.20.0

  - ### shake128_256

    public static byte[] shake128_256(String data)
    Calculates the SHAKE128-256 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest; converted to bytes using `StringUtils.getBytesUtf8(String)`.
    Returns:
      SHAKE128-256 digest.
    Since:
      1.20.0

  - ### shake128_256Hex

    public static String shake128_256Hex(byte[] data)
    Calculates the SHAKE128-256 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHAKE128-256 digest as a hexadecimal string.
    Since:
      1.20.0

  - ### shake128_256Hex

    public static String shake128_256Hex(InputStream data) throws IOException
    Calculates the SHAKE128-256 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHAKE128-256 digest as a hexadecimal string.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.20.0

  - ### shake128_256Hex

    public static String shake128_256Hex(String data)
    Calculates the SHAKE128-256 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHAKE128-256 digest as a hexadecimal string.
    Since:
      1.20.0

  - ### shake256_512

    public static byte[] shake256_512(byte[] data)
    Calculates the SHAKE256-512 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHAKE256-512 digest.
    Since:
      1.20.0

  - ### shake256_512

    public static byte[] shake256_512(InputStream data) throws IOException
    Calculates the SHAKE256-512 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHAKE256-512 digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.20.0

  - ### shake256_512

    public static byte[] shake256_512(String data)
    Calculates the SHAKE256-512 digest and returns the value as a `byte[]`.
    Parameters:
      `data` - Data to digest; converted to bytes using `StringUtils.getBytesUtf8(String)`.
    Returns:
      SHAKE256-512 digest.
    Since:
      1.20.0

  - ### shake256_512Hex

    public static String shake256_512Hex(byte[] data)
    Calculates the SHAKE256-512 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHAKE256-512 digest as a hexadecimal string.
    Since:
      1.20.0

  - ### shake256_512Hex

    public static String shake256_512Hex(InputStream data) throws IOException
    Calculates the SHAKE256-512 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHAKE256-512 digest as a hexadecimal string.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.20.0

  - ### shake256_512Hex

    public static String shake256_512Hex(String data)
    Calculates the SHAKE256-512 digest and returns the value as a hexadecimal string.
    Parameters:
      `data` - Data to digest.
    Returns:
      SHAKE256-512 digest as a hexadecimal string.
    Since:
      1.20.0

  - ### updateDigest

    public static MessageDigest updateDigest(MessageDigest messageDigest, byte[] valueToDigest)
    Updates the given `MessageDigest`.
    Parameters:
      `messageDigest` - The `MessageDigest` to update.
      `valueToDigest` - The value to update the `MessageDigest` with.
    Returns:
      The updated `MessageDigest`.
    Since:
      1.7

  - ### updateDigest

    public static MessageDigest updateDigest(MessageDigest messageDigest, ByteBuffer valueToDigest)
    Updates the given `MessageDigest`.
    Parameters:
      `messageDigest` - The `MessageDigest` to update.
      `valueToDigest` - The value to update the `MessageDigest` with.
    Returns:
      The updated `MessageDigest`.
    Since:
      1.11

  - ### updateDigest

    public static MessageDigest updateDigest(MessageDigest digest, File data) throws IOException
    Reads through a File and updates the digest for the data
    Parameters:
      `digest` - The MessageDigest to use (for example MD5).
      `data` - Data to digest.
    Returns:
      The digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.11

  - ### updateDigest

    public static MessageDigest updateDigest(MessageDigest digest, InputStream inputStream) throws IOException
    Reads through an InputStream and updates the digest for the data
    Parameters:
      `digest` - The MessageDigest to use (for example MD5).
      `inputStream` - Data to digest.
    Returns:
      The digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.8

  - ### updateDigest

    public static MessageDigest updateDigest(MessageDigest digest, Path path, OpenOption... options) throws IOException
    Reads through a Path and updates the digest for the data
    Parameters:
      `digest` - The MessageDigest to use (for example MD5).
      `path` - Data to digest.
      `options` - options How to open the file.
    Returns:
      The digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.14

  - ### updateDigest

    public static MessageDigest updateDigest(MessageDigest digest, RandomAccessFile data) throws IOException
    Reads through a RandomAccessFile and updates the digest for the data using non-blocking-io (NIO)
    Parameters:
      `digest` - The MessageDigest to use (for example MD5).
      `data` - Data to digest.
    Returns:
      The digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.14

  - ### updateDigest

    public static MessageDigest updateDigest(MessageDigest messageDigest, String valueToDigest)
    Updates the given `MessageDigest` from a String (converted to bytes using UTF-8).

    To update the digest using a different charset for the conversion, convert the String to a byte array using `String.getBytes(java.nio.charset.Charset)` and pass that to the `updateDigest(MessageDigest, byte[])` method

    Parameters:
      `messageDigest` - The `MessageDigest` to update.
      `valueToDigest` - The value to update the `MessageDigest` with; converted to bytes using `StringUtils.getBytesUtf8(String)`.
    Returns:
      The updated `MessageDigest`.
    Since:
      1.7

  - ### digest

    public byte[] digest(byte[] data)
    Reads through a byte array and returns the digest for the data.
    Parameters:
      `data` - Data to digest.
    Returns:
      The digest.
    Since:
      1.11

  - ### digest

    public byte[] digest(ByteBuffer data)
    Reads through a ByteBuffer and returns the digest for the data
    Parameters:
      `data` - Data to digest.
    Returns:
      The digest.
    Since:
      1.11

  - ### digest

    public byte[] digest(File data) throws IOException
    Reads through a File and returns the digest for the data
    Parameters:
      `data` - Data to digest.
    Returns:
      The digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.11

  - ### digest

    public byte[] digest(InputStream data) throws IOException
    Reads through an InputStream and returns the digest for the data
    Parameters:
      `data` - Data to digest.
    Returns:
      The digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.11

  - ### digest

    public byte[] digest(Path data, OpenOption... options) throws IOException
    Reads through a File and returns the digest for the data
    Parameters:
      `data` - Data to digest.
      `options` - options How to open the file.
    Returns:
      The digest.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.14

  - ### digest

    public byte[] digest(String data)
    Reads through a byte array and returns the digest for the data.
    Parameters:
      `data` - Data to digest treated as UTF-8 string.
    Returns:
      The digest.
    Since:
      1.11

  - ### digestAsHex

    public String digestAsHex(byte[] data)
    Reads through a byte array and returns the digest for the data.
    Parameters:
      `data` - Data to digest.
    Returns:
      The digest as a hexadecimal string.
    Since:
      1.11

  - ### digestAsHex

    public String digestAsHex(ByteBuffer data)
    Reads through a ByteBuffer and returns the digest for the data
    Parameters:
      `data` - Data to digest.
    Returns:
      The digest as a hexadecimal string.
    Since:
      1.11

  - ### digestAsHex

    public String digestAsHex(File data) throws IOException
    Reads through a File and returns the digest for the data
    Parameters:
      `data` - Data to digest.
    Returns:
      The digest as a hexadecimal string.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.11

  - ### digestAsHex

    public String digestAsHex(InputStream data) throws IOException
    Reads through an InputStream and returns the digest for the data
    Parameters:
      `data` - Data to digest.
    Returns:
      The digest as a hexadecimal string.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.11

  - ### digestAsHex

    public String digestAsHex(Path data, OpenOption... options) throws IOException
    Reads through a File and returns the digest for the data
    Parameters:
      `data` - Data to digest.
      `options` - options How to open the file.
    Returns:
      The digest as a hexadecimal string.
    Throws:
      `IOException` - On error reading from the stream.
    Since:
      1.11

  - ### digestAsHex

    public String digestAsHex(String data)
    Reads through a byte array and returns the digest for the data.
    Parameters:
      `data` - Data to digest treated as UTF-8 string.
    Returns:
      The digest as a hexadecimal string.
    Since:
      1.11

  - ### getMessageDigest

    public MessageDigest getMessageDigest()
    Returns the message digest instance.
    Returns:
      The message digest instance.
    Since:
      1.11