How can I encrypt/decrypt 12-digit decimal numbers to other ones, using a password and Java?

后端 未结 12 1142
再見小時候
再見小時候 2020-12-15 15:12

I have already read Using Java to encrypt integers and Encrypting with DES Using a Pass Phrase.

All I need is a simple Encrypter which transforms a 12 digit number t

12条回答
  •  一整个雨季
    2020-12-15 15:18

    You're not going to be able to convert 16 bytes into a 12 digit number without losing information. 256 ^ 16 > 10^12. (Not that you even have 10^12 options, as you've only got the range [100000000000, 999999999999].

    I doubt that you'll be able to use any traditional encryption libraries, as your requirements are somewhat odd.

提交回复
热议问题