public class Hasher extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Hasher.Algorithm
Enum that represents each different algorithm supported by the Hasher.
|
| Constructor and Description |
|---|
Hasher() |
Hasher(Hasher.Algorithm algorithm) |
| Modifier and Type | Method and Description |
|---|---|
String |
toHashedBase64String(byte[] bytes)
Hashes the input bytes into a Base-64 encoded hashed String.
|
String |
toHashedBase64String(String string0)
Hashes the input String into a Base-64 encoded hashed String.
|
byte[] |
toHashedBytes(byte[] bytes)
Hashes the input bytes into a hashed byte[] -- no special encoding.
|
String |
toHashedHexString(byte[] bytes)
Hashes the input bytes into a hex encoded hashed String.
|
String |
toHashedHexString(String string0)
Hashes the input String into a hex encoded hashed String.
|
public Hasher()
public Hasher(Hasher.Algorithm algorithm)
public String toHashedHexString(String string0) throws NoSuchAlgorithmException
string0 - The String to hash. This assumes its an ASCII string.NoSuchAlgorithmExceptionpublic String toHashedHexString(byte[] bytes) throws NoSuchAlgorithmException
bytes - The bytes to hashNoSuchAlgorithmExceptionpublic String toHashedBase64String(String string0) throws NoSuchAlgorithmException
string0 - The String to hash. This assumes its an ASCII string.NoSuchAlgorithmExceptionpublic String toHashedBase64String(byte[] bytes) throws NoSuchAlgorithmException
bytes - The bytes to hashNoSuchAlgorithmExceptionpublic byte[] toHashedBytes(byte[] bytes)
throws NoSuchAlgorithmException
bytes - The bytes to hashNoSuchAlgorithmExceptionCopyright © 2012-2015 Cloudhopper by Twitter. All Rights Reserved.