Class Crypt


  • public final class Crypt
    extends Object
    Various utility methods for encryption.
    • 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.