Package com.luna.common.encrypt
Class HashTools
java.lang.Object
com.luna.common.encrypt.HashTools
- Author:
- luna@mac 2021年05月10日 14:11
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
checkFileWithMd5
(InputStream path, String md5) static boolean
checkFileWithMd5
(String path, String md5) static boolean
checkFileWithSHA256
(InputStream path, String sha256) static boolean
checkFileWithSHA256
(String path, String md5) static String
md5
(InputStream inputStream) static String
获取文件或者字符串的MD5值static String
md5WithFile
(String path) static String
md5WithFile
(String path, String charset) static String
sha256
(InputStream inputStream) static String
static String
sha256WithFile
(String path) static String
sha256WithFile
(String path, String charset) static String
sha512
(InputStream inputStream) static String
static String
sha512WithFile
(String path) static String
sha512WithFile
(String path, String charset)
-
Constructor Details
-
HashTools
public HashTools()
-
-
Method Details
-
md5
获取文件或者字符串的MD5值- Parameters:
data
- 数据- Returns:
-
md5WithFile
-
md5WithFile
-
md5
-
sha512
-
sha512
-
sha512WithFile
-
sha512WithFile
-
sha256
-
sha256WithFile
-
sha256WithFile
-
sha256
-
checkFileWithSHA256
-
checkFileWithSHA256
-
checkFileWithMd5
-
checkFileWithMd5
-