Magica is a command line program that encodes or decodes hexadecimal, decimal, octal, binary or any other base from 2 to 32. Each byte is encoded as a number written in the specified base, separated by spaces. Magica decodes correctly even if there are no separating spaces. If there are spaces, leading zeroes aren't necessary.
Magica can read from standard input and write to standard output, so if your environment supports it you can copy encoded text to the terminal window where Magica is running and see the decoded text in the same window. If you want to encode a single line you can even type directly into Magica, but only if you don't make any mistakes, since you can't edit.
Magica understands these parameters:
encode |
Encode instead of decoding. |
base=<number> |
Use this base. If no base is specified, hexadecimal (base 16) is used. The base must be specified in base ten. |
in=<filename> |
Read from this file instead of standard input. |
out=<filename> |
Write to this file instead of standard output. |
The current version is 1.1. Note that line breaks may get converted in various ways, so it may not work for data that isn't text.
These files are available:
java -jar magica.jar
or something similar, depending on
your Java engine.And why is it called Magica? Well, Magica de Spell is called Magica de Hex in Sweden (because "Hex" resembles "häxa", which means "witch"), and the program's default mode of operation is to "de-hex" – to decode from hexadecimal. It also "magically" translates line breaks. (In fact it's a little too magic. There may soon be a new version with improved magic.)
published 2003-05-03