Package jodd.util

Interface DigestEngine

All Known Implementing Classes:
DigestEngine.JavaDigestEngine

public interface DigestEngine
Digest engines.
  • Method Details

    • md2

      static DigestEngine md2()
      Creates new MD2 digest.
    • md5

      static DigestEngine md5()
      Creates new MD5 digest.
    • sha1

      static DigestEngine sha1()
      Creates new SHA-1 digest.
    • sha256

      static DigestEngine sha256()
      Creates new SHA-256 digest.
    • sha384

      static DigestEngine sha384()
      Creates new SHA-384 digest.
    • sha512

      static DigestEngine sha512()
      Creates new SHA-512 digest.
    • digest

      byte[] digest(byte[] input)
      Returns byte-hash of input byte array.
    • digest

      default byte[] digest(String input)
      Returns byte-hash of input string.
    • digest

      byte[] digest(File file) throws IOException
      Returns digest of a file. Implementations may not read the whole file into the memory.
      Throws:
      IOException
    • digestString

      default String digestString(byte[] byteArray)
      Returns string hash of input byte array.
    • digestString

      default String digestString(String input)
      Returns string hash of input string.
    • digestString

      default String digestString(File file) throws IOException
      Throws:
      IOException