Java AES encryption and decryption

后端 未结 6 1394
独厮守ぢ
独厮守ぢ 2020-12-07 15:48

I would like to encrypt and decrypt a password using 128 bit AES encryption with 16 byte key. I am getting javax.crypto.BadPaddingException error while decrypt

6条回答
  •  独厮守ぢ
    2020-12-07 16:49

    Complete example of encrypting/Decrypting a huge video without throwing Java OutOfMemoryException and using Java SecureRandom for Initialization Vector generation. Also depicted storing key bytes to database and then reconstructing same key from those bytes.

    https://stackoverflow.com/a/18892960/185022

提交回复
热议问题