public class Hex extends Object
| Constructor and Description |
|---|
Hex() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decode(String hexStr)
Decode hexadecimal-encoded string and return raw byte array.
|
static String |
encode(byte[] b,
boolean leading0x)
Output byte representation as hexadecimal representation.
|
static byte[] |
fromHex(String hexStr)
Decode hexadecimal-encoded string and return raw byte array.
|
static String |
toHex(byte[] b,
boolean leading0x)
Output byte representation as hexadecimal representation.
|
public static String toHex(byte[] b, boolean leading0x)
b - Bytes to encode to hexadecimal representation.leading0x - If true, return with leading "0x".public static String encode(byte[] b, boolean leading0x)
toHex() method.b - Bytes to encode to hexadecimal representation.leading0x - If true, return with leading "0x".public static byte[] fromHex(String hexStr)
hexStr - Hexadecimal-encoded string, with or without leading "0x".public static byte[] decode(String hexStr)
fromHex() method.hexStr - Hexadecimal-encoded string, with or without leading "0x".Copyright © 2016 The Open Web Application Security Project (OWASP). All rights reserved.