"decoder wheel" translator script
I administer a database where the passwords are stored "encrypted." (and I can't use that term loosely enough.) The cipher is a basic a=XX, b=YZ, etc scheme where a double alphanumeric character (and/or "%") is used to represent a single plain letter/number.
I'm using apg to generate random alphanumeric passwords but I need to then translate those generated passwords into the encrypted form. I have had moderate success using SED substitution but there are 62 possible characters each with its own 2-character encrypted equivalent. The problem is that the substitution becomes circular at a certain point thereby overwriting one sub with another. I've been using a Bash/SED approach but assume there are other (and likely better) ways to do this.