I tried searching for information on this, but must not know the right terms to use...
What would be the simplest way to store information in a human-readable and -writeable passcode, with enough padding to make randomly guessed codes unlikely to be valid? Not unlike 8-bit console games' password-save systems.
In my particular case, I'd like to be able to encode three unsigned integers (with a maximum length of probably about 20 bits each) into a passcode under Java 1.4.2, and decrypt them on a web server. I was thinking about also adding a random or date-based value in an attempt to make passcodes unique.
The code could use numbers, mixed-case letters and potentially some simple symbols, but should probably exclude easily-confused characters like 1lI and O0. Since the user needs to type it, obviously shorter is better.
Thanks!
ABCDEFGHJKLMNPQRSTUVWXYZ0123456789
which contains 34 symbols.The number of symbols needed to represent k
bits of data in base n
plus one check digit is ceil(k * log(2) / log(n)) + 1
, which is only 5 for k
=20 bits and n
=34.