Using java to encrypt integers

后端 未结 7 1477
野性不改
野性不改 2021-02-03 14:14

I\'m trying to encrypt some integers in java using java.security and javax.crypto.

The problem seems to be that the Cipher class only encrypts byte arrays. I can\'t d

相关标签:
7条回答
  • 2021-02-03 15:17

    You can also use BigInteger for conversion:

     BigInteger.valueOf(integer).toByteArray();
    
    0 讨论(0)
提交回复
热议问题