Binary Payload Encoding and Decoding
Purpose:
This page contains a utility written in java to help convert binary data (encoding) into hex base 64. This allows for binary data to be included in xml. This tool also allows one to decode a hex base 64 data back into its binary form.
Assumptions:
Must have latest Java 1.6 version installed.
Artifacts:
How To Use:
The utility takes a file input with the -f argument option. Additionally you need to pass in one of 2 argument options: -e or -d in order to
Here are the options:
[ -f ] to pass in a file (full directory path)
[ -e ] to encode from binary to hex
[ -d ] to decode from hex to binary
The result of the program is another file that is named for the encoding or decoding operation: so if the input file is: temp.bin then the output file is: Encoded_temp.bin
Example:
The following example takes a file temp.bin (with binary data) and encodes it into a hex data file named: Encoded_temp.bin
java -jar HexCoder-0.0.1-SNAPSHOT-jar-with-dependencies.jar -f /Users/mark/Dev/ws/junoWS/HexCoder/temp.bin -e
Command line output:
|