Class Sha512DigestUtils


  • public abstract class Sha512DigestUtils
    extends java.lang.Object
    Provides SHA512 digest methods.

    Based on Commons Codec, which does not presently provide SHA512 support.

    Since:
    2.0.1
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static byte[] sha​(byte[] data)
      Calculates the SHA digest and returns the value as a byte[].
      static byte[] sha​(java.lang.String data)
      Calculates the SHA digest and returns the value as a byte[].
      static java.lang.String shaHex​(byte[] data)
      Calculates the SHA digest and returns the value as a hex string.
      static java.lang.String shaHex​(java.lang.String data)
      Calculates the SHA digest and returns the value as a hex string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Sha512DigestUtils

        public Sha512DigestUtils()
    • Method Detail

      • sha

        public static byte[] sha​(byte[] data)
        Calculates the SHA digest and returns the value as a byte[].
        Parameters:
        data - Data to digest
        Returns:
        SHA digest
      • sha

        public static byte[] sha​(java.lang.String data)
        Calculates the SHA digest and returns the value as a byte[].
        Parameters:
        data - Data to digest
        Returns:
        SHA digest
      • shaHex

        public static java.lang.String shaHex​(byte[] data)
        Calculates the SHA digest and returns the value as a hex string.
        Parameters:
        data - Data to digest
        Returns:
        SHA digest as a hex string
      • shaHex

        public static java.lang.String shaHex​(java.lang.String data)
        Calculates the SHA digest and returns the value as a hex string.
        Parameters:
        data - Data to digest
        Returns:
        SHA digest as a hex string