Package net.shibboleth.shared.codec
Class HexSupport
java.lang.Object
net.shibboleth.shared.codec.HexSupport
Helper class for working with hex encoding/decoding of binary data.
This wraps the current commons-codec implementation to insulate calling code from the specific implementation for future revision.
- Since:
- 9.3.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]Decodes hex-encoded data back into binary.static StringencodeLowerCase(byte[] data) Hex-encodes the given binary data into lower case characters.static StringencodeUpperCase(byte[] data) Hex-encodes the given binary data into upper case characters.
-
Constructor Details
-
HexSupport
private HexSupport()Constructor.
-
-
Method Details
-
encodeLowerCase
Hex-encodes the given binary data into lower case characters.- Parameters:
data- data to encode- Returns:
- the hex-encoded data
-
encodeUpperCase
Hex-encodes the given binary data into upper case characters.- Parameters:
data- data to encode- Returns:
- the hex-encoded data
-
decode
Decodes hex-encoded data back into binary.- Parameters:
data- hex-encoded string- Returns:
- the decoded data
- Throws:
DecodingException- if unable to decode
-