Package fr.cryptohash.util
Class Hexs
java.lang.Object
fr.cryptohash.util.Hexs
public final class Hexs extends Object
Hexadecimal utils.
- Author:
- Stephan Fuhrmann <s@sfuhrm.de>
-
Method Summary
Modifier and Type Method Description static StringbytesToHexString(byte[] bytes)Converts bytes to a hex String.static byte[]hexStringToBytes(String str)Converts a hex String to bytes.
-
Method Details
-
bytesToHexString
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
Converts a hex String to bytes.- Parameters:
str- a hexadecimal String.- Returns:
- the parsed bytes.
- Throws:
NumberFormatException- if theStringdoes not contain a parsableint.
-