public class HashFunctions extends Object
| コンストラクタ | 説明 |
|---|---|
HashFunctions() |
| 修飾子とタイプ | メソッド | 説明 |
|---|---|---|
static String |
GetFileHash(String filename,
String algorithm) |
Calculates a hash value of a file.
|
static String |
GetHash(String value,
String algorithm) |
Returns a hash value of a string computed with the specified algorithm.
|
static String |
GetHash(List<Byte> value,
String algorithm) |
Returns a hash value of a byte list computed with the specified algorithm.
|
public static String GetHash(String value, String algorithm) throws NoSuchAlgorithmException
value - Stringalgorithm - Algorithm to compute a hash valueNoSuchAlgorithmException - Unknown algorithm specifiedpublic static String GetHash(List<Byte> value, String algorithm) throws NoSuchAlgorithmException
value - Byte listalgorithm - Algorithm to compute a hash valueNoSuchAlgorithmException - Unknown algorithm specifiedpublic static String GetFileHash(String filename, String algorithm) throws FileNotFoundException, NoSuchAlgorithmException
filename - Filenamealgorithm - AlgorithmFileNotFoundException - Specified file not foundNoSuchAlgorithmException - Specified algorithm not foundCopyright © 2019. All rights reserved.