Class Hash

java.lang.Object
org.filestack.internal.Hash

public final class Hash extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    hmacSha256(byte[] key, byte[] message)
    Computes hash using HmacSHA256 algorithm.
    static byte[]
    md5(byte[] bytes)
    Computes MD5 hash out of provided array of bytes.
    static byte[]
    md5(byte[] bytes, int offset, int length)
    Computes MD5 hash out of provided array of bytes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • md5

      @Nullable public static byte[] md5(byte[] bytes)
      Computes MD5 hash out of provided array of bytes.
      Parameters:
      bytes - - the array of bytes
    • md5

      @Nullable public static byte[] md5(byte[] bytes, int offset, int length)
      Computes MD5 hash out of provided array of bytes.
      Parameters:
      bytes - - the array of bytes
      offset - - the offset to start from in the array of bytes.
      length - - the number of bytes to use, starting at offset.
    • hmacSha256

      @Nullable public static String hmacSha256(byte[] key, byte[] message)
      Computes hash using HmacSHA256 algorithm.
      Parameters:
      key - - key used to sign the message
      message - - message to hash