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
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