public class HashUtils extends Object
Constructor and Description |
---|
HashUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
digest(String pText,
String pAlgorithm)
Computes a hash function using the supplied algorithm and s
the result as a string representation using
hex as the encoding and UTF-8 as the character set.
|
static String |
md5Sum(String pText) |
static String |
sha256Sum(String pText) |
public static String md5Sum(String pText) throws NoSuchAlgorithmException, UnsupportedEncodingException
public static String sha256Sum(String pText) throws NoSuchAlgorithmException, UnsupportedEncodingException
public static String digest(String pText, String pAlgorithm) throws NoSuchAlgorithmException, UnsupportedEncodingException
pText
- pAlgorithm
- NoSuchAlgorithmException
UnsupportedEncodingException
Copyright © 2017 DocDoku. All rights reserved.