| |
|
| java.lang.Object com.jcorporate.expresso.core.misc.HexEncoder
HexEncoder | public class HexEncoder (Code) | | Hex encoding class.
Many thanks goes to Wei Dai's
Crypto++ for providing
public domain C++ code that this could be derived from.
author: Michael Rimov |
Method Summary | |
public static byte[] | decode(String inputData) Decodes a string containing hexadecimal characters into the resulting binary
values.
Parameters: inputData - - The string to be decoded. | public static String | encode(byte[] inputData) Encode an array of binary data into a string of hexadecimal values.
Parameters: inputData - - A byte array that will be encoded. | public static String | encode(String s) Encode an array of binary data into a string of hexadecimal values. |
HexEncoder | public HexEncoder()(Code) | | |
decode | public static byte[] decode(String inputData) throws IllegalArgumentException(Code) | | Decodes a string containing hexadecimal characters into the resulting binary
values.
Parameters: inputData - - The string to be decoded. The input string must haveonly characters "0-9 and A-F" Any other characters in the stringwill result in an illegal argument exception. an array of bytes representing the decoded input string throws: IllegalArgumentException - if the string is null, is of zero length, orcontains illegal characters. |
encode | public static String encode(byte[] inputData) throws IllegalArgumentException(Code) | | Encode an array of binary data into a string of hexadecimal values.
Parameters: inputData - - A byte array that will be encoded. The resulting encoded string. throws: IllegalArgumentException - If the length of the byte array is zero. |
|
|
|