Crockford's 32
base32tohex
JavaScript
var charmap = function (alphabet, mappings) {
mappings || (mappings = {});
alphabet.split("").forEach(function (c, i) {
if (!(c in mappings)) mappings[c] = i;
});
return mappings;
}
var crockford = {
alphabet: "0123456789ABCDEFGHJKMNPQRSTVWXYZ",
charmap: {
O: 0,
I: 1,
L: 1
}
};
crockford.charmap = charmap(crockford.alphabet, crockford.charmap);