public class Codec
extends java.lang.Object
Constructor and Description |
---|
Codec() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
byteToHexString(byte[] bytes)
Write a byte array as hexadecimal String.
|
static byte[] |
decodeBASE64(java.lang.String value)
Decode a base64 value
|
static java.lang.String |
encodeBASE64(byte[] value)
Encode binary data to base64
|
static java.lang.String |
encodeBASE64(java.lang.String value)
Encode a String to base64
|
static java.lang.String |
hexMD5(java.lang.String value)
Build an hexadecimal MD5 hash for a String
|
static java.lang.String |
hexSHA1(java.lang.String value)
Build an hexadecimal SHA1 hash for a String
|
static byte[] |
hexStringToByte(java.lang.String hexString)
Transform an hexadecimal String to a byte array.
|
static java.lang.String |
UUID()
Generate an UUID String
|
public static java.lang.String UUID()
public static java.lang.String encodeBASE64(java.lang.String value)
value
- The plain Stringpublic static java.lang.String encodeBASE64(byte[] value)
value
- The binary datapublic static byte[] decodeBASE64(java.lang.String value)
value
- The base64 encoded Stringpublic static java.lang.String hexMD5(java.lang.String value)
value
- The String to hashpublic static java.lang.String hexSHA1(java.lang.String value)
value
- The String to hashpublic static java.lang.String byteToHexString(byte[] bytes)
bytes
- byte arraypublic static byte[] hexStringToByte(java.lang.String hexString)
hexString
- Hexadecimal string to transformGuillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly