public class HashExtensions extends Object
HashExtensions.| Constructor and Description |
|---|
HashExtensions() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
hash(byte[] hashIt,
HashAlgorithm hashAlgorithm)
Hashes the given
byte[] object with the given parameters. |
static byte[] |
hash(byte[] hashIt,
String salt,
HashAlgorithm hashAlgorithm,
Charset charset)
Hashes the given
byte[] object with the given parameters. |
static String |
hash(String hashIt,
String salt,
HashAlgorithm hashAlgorithm,
Charset charset)
Hashes the given
String object with the given parameters. |
static String |
hashAndBase64(String hashIt,
String salt,
HashAlgorithm hashAlgorithm,
Charset charset)
Hashes and encodes it with base64 from the given
String object with the given
parameters. |
public static byte[] hash(byte[] hashIt,
HashAlgorithm hashAlgorithm)
throws NoSuchAlgorithmException
byte[] object with the given parameters.hashIt - the hash ithashAlgorithm - the hash algorithmString objectNoSuchAlgorithmException - is thrown if instantiation of the MessageDigest object fails.public static byte[] hash(byte[] hashIt,
String salt,
HashAlgorithm hashAlgorithm,
Charset charset)
throws NoSuchAlgorithmException
byte[] object with the given parameters.hashIt - the hash itsalt - the salthashAlgorithm - the hash algorithmcharset - the charsetString objectNoSuchAlgorithmException - is thrown if instantiation of the MessageDigest object fails.public static String hash(String hashIt, String salt, HashAlgorithm hashAlgorithm, Charset charset) throws NoSuchAlgorithmException
String object with the given parameters.hashIt - the hash itsalt - the salthashAlgorithm - the hash algorithmcharset - the charsetString objectNoSuchAlgorithmException - is thrown if instantiation of the MessageDigest object fails.public static String hashAndBase64(String hashIt, String salt, HashAlgorithm hashAlgorithm, Charset charset) throws NoSuchAlgorithmException
String object with the given
parameters.hashIt - the hash itsalt - the salthashAlgorithm - the hash algorithmcharset - the charsetString objectNoSuchAlgorithmException - is thrown if instantiation of the MessageDigest object fails.Copyright © 2015–2017 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.