org.owasp.esapi.codecs
public class Hex extends java.lang.Object
| Constructor and Description |
|---|
Hex() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decode(java.lang.String hexStr)
Decode hexadecimal-encoded string and return raw byte array.
|
static java.lang.String |
encode(byte[] b,
boolean leading0x)
Output byte representation as hexadecimal representation.
|
static byte[] |
fromHex(java.lang.String hexStr)
Decode hexadecimal-encoded string and return raw byte array.
|
static java.lang.String |
toHex(byte[] b,
boolean leading0x)
Output byte representation as hexadecimal representation.
|
public static java.lang.String toHex(byte[] b,
boolean leading0x)
b - Bytes to encode to hexadecimal representation.leading0x - If true, return with leading "0x".public static java.lang.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(java.lang.String hexStr)
hexStr - Hexadecimal-encoded string, with or without leading "0x".public static byte[] decode(java.lang.String hexStr)
fromHex() method.hexStr - Hexadecimal-encoded string, with or without leading "0x".Copyright © 2014 The Open Web Application Security Project (OWASP). All Rights Reserved.