public final class AuthTools extends Object
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
base64ToByte(String data)
From a base 64 representation, returns the corresponding byte[]
|
static String |
byteToBase64(byte[] data)
From a byte[] returns a base 64 representation.
|
static String |
getMd5Digest(String input)
Returns a MD5 digest.
|
static String |
getRandomSalt(int length)
Returns a random salt with a given length.
|
static String |
getSha1Digest(String input)
Returns a SHA-1 digest.
|
static String |
getSha512Digest(String input)
Returns a SHA-512 digest.
|
public static byte[] base64ToByte(String data) throws IOException
data - The base 64 data to be converted to byte[].IOExceptionpublic static String byteToBase64(byte[] data)
data - The byte[] to be converted to base 64.public static String getRandomSalt(int length)
length - The length of the salt in byte.public static String getMd5Digest(String input)
getSha512Digest(String) method or at least the getSha1Digest(String) method.input - the input stringpublic static String getSha1Digest(String input)
getSha512Digest(String) method.input - the input stringCopyright © 2011–2017 aiticon GmbH. All rights reserved.