>>11898813Continuing on the train of thought:
To code it you would need to map each to the number of the place it takes in the alphabet. If you're using any ascii coded programming language you can do this:
//
char letter
letter = get_letter() //use a parser to only get upper case char
letter_num = 'A' - letter
//
From here, you can simply use modulo to get it in the range 0-9 by doing:
letter_num = letter_num % 9
However, this cypher is relatively easy to crack, as the English language has certain combinations of letters that are common, making it easy to decipher.
If you want to spice it up, you can use something like a function that shambles the number values, making it a bit more difficult, as the key is a formula which is not explicitly known.