开发者

Java AES Encryption/Decryption using a BigInteger as a key

Is it possible to encrypt/de开发者_如何转开发crypt a string using AES with a BigInteger (given one, not a randomly generated number) as a key in Java?


You don't need BigInteger for AES key creation, the key needs to be 16 bytes long for 128-bit encryption, 24 bytes long for 192-bit encryption and 32 bytes long for 256-bit encryption.

So the key would be a byte array rather than a BigInteger. BigInteger is used in RSA and other PKI's because of the huge numbers needed to create the keys but AES doesn't do that.

Hope this helps.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜