public class Encryption extends Object
Constructor and Description |
---|
Encryption() |
Modifier and Type | Method and Description |
---|---|
static String |
getMD5(String string)
Return a hash based on MD5
|
static String |
getMD5(String string,
String salt)
Return a hash based on MD5
|
static String |
getMessageDigest(String algorithm,
String string)
Return a string based on java MessageDigest API
|
static String |
getSHA256(String string)
Return a hash based on SHA-256
|
static String |
getSHA512(String string)
Return a hash based on SHA-512
|
public static String getMessageDigest(String algorithm, String string) throws NoSuchAlgorithmException
algorithm
- string
- NoSuchAlgorithmException
public static String getMD5(String string, String salt) throws NoSuchAlgorithmException
string
- salt
- NoSuchAlgorithmException
public static String getMD5(String string) throws NoSuchAlgorithmException
string
- NoSuchAlgorithmException
public static String getSHA256(String string) throws NoSuchAlgorithmException
string
- NoSuchAlgorithmException
public static String getSHA512(String string) throws NoSuchAlgorithmException
string
- NoSuchAlgorithmException
Copyright © 2015. All rights reserved.