You don't have to store the actual name, You can save data related to it. How much characters it has, its first character and its last and so on. More complicated =more safety and you reduce the possibility of players exchanging the code, especially if they do not know your choice what is saved in the code.
I don't know professional ways, sadly.
However, you can replace certain data. Example: If Ach 1 and 2 equal false, not obtained, then do not create a 00, but a X, for example.
If any two following achievements are false, then replace the two 0 with a X.
If any three following achievements are false, then replace the three 0 with a Y.
If three following achievements are obfained, then replace 111 with A.
If two A follow each other, then replace it with Q, if a X and a Y follow each other, replace them with W.
This kind of coding, that would be my approach.