Package shchuko.md5genlib
Class MD5GenUtils
- java.lang.Object
-
- shchuko.md5genlib.MD5GenUtils
-
public class MD5GenUtils extends java.lang.Object
Additional utilities to generate MD5 hash
-
-
Constructor Summary
Constructors Constructor Description MD5GenUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MD5HashResult
getBytesHash(byte[] bytes)
Generate hash from byte[]static MD5HashResult
getHashOfFile(java.nio.file.Path path)
Generate hash from file by pathstatic MD5HashResult
getStringHash(java.lang.String s)
Generate hash from String
-
-
-
Method Detail
-
getBytesHash
public static MD5HashResult getBytesHash(byte[] bytes)
Generate hash from byte[]- Parameters:
bytes
- Input bytes to hash- Returns:
- Hash value
-
getStringHash
public static MD5HashResult getStringHash(java.lang.String s)
Generate hash from String- Parameters:
s
- Input string- Returns:
- Hash value
-
getHashOfFile
public static MD5HashResult getHashOfFile(java.nio.file.Path path) throws java.io.IOException
Generate hash from file by path- Parameters:
path
- File to calculate hash from- Returns:
- Hash result
- Throws:
java.io.IOException
- If file couldn't be opened
-
-