public final class Hash extends Object
MessageDigest| Modifier and Type | Method and Description |
|---|---|
static String |
hash(File file,
HashingAlgorithm algorithm)
Hashes input from the supplied file, using the supplied algorithm.
|
static String |
hash(String message,
HashingAlgorithm algorithm)
Hashes the supplied message using the supplied algorithm.
|
public static String hash(String message, HashingAlgorithm algorithm)
message - The message to hash.algorithm - The hashing algorithm to perform the hashing.HashingException - When the supplied message could not be hashed.NullPointerException - When either the supplied message or algorithm is null.public static String hash(File file, HashingAlgorithm algorithm)
file - The file to hash.algorithm - The hashing algorithm to perform the hashing.HashingException - When the data from the supplied file could not be hashed.NullPointerException - When either the supplied file or algorithm is null.Copyright © 2008–2017. All rights reserved.