Package nl.gx.webmanager.handler.util
Class Crypt
- java.lang.Object
-
- nl.gx.webmanager.handler.util.Crypt
-
public final class Crypt extends Object
Various utility methods for encryption.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
bytesToHex(byte[] array)
Converts a byte array to a hex string.static String
crypt(String password)
static byte[]
hexToBytes(String s)
Convert a hex string to a byte array.
-
-
-
Method Detail
-
bytesToHex
public static String bytesToHex(byte[] array)
Converts a byte array to a hex string.- Parameters:
array
- Byte array- Returns:
- String Concatenation of the hex values of the byte array.
-
hexToBytes
public static byte[] hexToBytes(String s)
Convert a hex string to a byte array. Permits upper or lower case hex.- Parameters:
s
- String must have even number of characters. and be formed only of digits 0-9 A-F or a-f. No spaces, minus or plus signs.- Returns:
- corresponding byte array.
-
-