Encrypt a number to another number of the same length

前端 未结 6 1506
逝去的感伤
逝去的感伤 2021-01-13 03:59

I need a way to take a 12 digit number and encrypt it to a different 12 digit number (no characters other than 0123456789). Then at a later point I need to be able to decryp

6条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-13 04:29

    If there's enough wriggle-room in the requirements that you can accept 16 hexadecimal digits as the encrypted side, just interpret the 12 digit decimal number as a 64bit plaintext and use a 64 bit block cipher like Blowfish, Triple-DES or IDEA.

提交回复
热议问题