Class HashTools

java.lang.Object
com.luna.common.encrypt.HashTools

public class HashTools extends Object
Author:
luna@mac 2021年05月10日 14:11
  • Constructor Details

    • HashTools

      public HashTools()
  • Method Details

    • md5

      public static String md5(String data)
      获取文件或者字符串的MD5值
      Parameters:
      data - 数据
      Returns:
    • md5WithFile

      public static String md5WithFile(String path, String charset)
    • md5WithFile

      public static String md5WithFile(String path)
    • md5

      public static String md5(InputStream inputStream)
    • sha512

      public static String sha512(InputStream inputStream)
    • sha512

      public static String sha512(String data)
    • sha512WithFile

      public static String sha512WithFile(String path, String charset)
    • sha512WithFile

      public static String sha512WithFile(String path)
    • sha256

      public static String sha256(String data)
    • sha256WithFile

      public static String sha256WithFile(String path, String charset)
    • sha256WithFile

      public static String sha256WithFile(String path)
    • sha256

      public static String sha256(InputStream inputStream)
    • checkFileWithSHA256

      public static boolean checkFileWithSHA256(InputStream path, String sha256)
    • checkFileWithSHA256

      public static boolean checkFileWithSHA256(String path, String md5)
    • checkFileWithMd5

      public static boolean checkFileWithMd5(InputStream path, String md5)
    • checkFileWithMd5

      public static boolean checkFileWithMd5(String path, String md5)