Class HexUtil

java.lang.Object
org.apache.kerby.util.HexUtil

public final class HexUtil extends Object
  • Method Details

    • bytesToHexFriendly

      public static String bytesToHexFriendly(byte[] bytes)
      Convert bytes into friendly format as: 0x02 02 00 80
      Parameters:
      bytes - The bytes to be converted
      Returns:
      The hex string
    • hex2bytesFriendly

      public static byte[] hex2bytesFriendly(String hexString)
      Convert friendly hex string like follows into byte array 0x02 02 00 80
      Parameters:
      hexString - The hex string
      Returns:
      The bytes
    • bytesToHex

      public static String bytesToHex(byte[] bytes)
      Convert bytes into format as: 02020080
      Parameters:
      bytes - The bytes
      Returns:
      The hex string
    • hex2bytes

      public static byte[] hex2bytes(String hexString)
      Convert hex string like follows into byte array 02020080
      Parameters:
      hexString - The hex string
      Returns:
      The bytes