Class Digest

java.lang.Object
org.ek9lang.core.Digest
All Implemented Interfaces:
Serializable

public final class Digest extends Object implements Serializable
Wraps the SHA 256 digest and the resulting byte array into objects, so we can deal with check objects rather than raw bytes.
See Also:
  • Method Details

    • getSha256

      public static MessageDigest getSha256()
      Access a sha1 message digest.
    • digest

      public static Digest.CheckSum digest(String input)
      Get checksum of an input.
    • digest

      public static Digest.CheckSum digest(byte[] input)
      Checksum of bytes.
    • digest

      public static Digest.CheckSum digest(File file)
      Open a file and create a checksum of the contents.
    • check

      public static boolean check(File contentsFile, File checkSumFile)
      Checks if the contents of a file when a check sum is calculated are the same as that in the check sum file.