Class Hexs

java.lang.Object
fr.cryptohash.util.Hexs

public final class Hexs
extends Object
Hexadecimal utils.
Author:
Stephan Fuhrmann <s@sfuhrm.de>
  • Method Details

    • bytesToHexString

      public static String bytesToHexString​(byte[] bytes)
      Converts bytes to a hex String.
      Parameters:
      bytes - the input bytes to convert.
      Returns:
      hexadecimal chars (upper case) representing the input.
      See Also:
      hexArray
    • hexStringToBytes

      public static byte[] hexStringToBytes​(String str)
      Converts a hex String to bytes.
      Parameters:
      str - a hexadecimal String.
      Returns:
      the parsed bytes.
      Throws:
      NumberFormatException - if the String does not contain a parsable int.