What I basically need is a way to encrypt and decrypt symmetrically an ID which is a string. Both version of the ID will live and work in different domain and I need a way to switch domain without hold in memory a mapping table. My requirements are:
- both kind of IDs must be human readble (alphanumeric).
- plain IDs have fixed length
- encrypted IDs must have fixed length (not necessarily the same of plain IDs)
abc123 ==== encrypt ====> as78ads89dfs ==== decrypt ====> abc123
23kop2 ==== encrypt ====> jfdsdfsg8dsf ==== decrypt ====> 23kop2
is there any way to obtain this with some combination of encryption and encoding?
thank you all