Encrypt a number to another number of the same length

前端 未结 6 1550
逝去的感伤
逝去的感伤 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:32

    One more way for simple encryption, you can just substruct each number from 10.

    For example initial numbers: 123456

    10-1 = 9 10-2 = 8 10-3 = 7 etc.

    and you will get 987654

    You can combine it with XOR for more secure encryption.

提交回复
热议问题