How to generate Rijndael KEY and IV using a passphrase?

I think you are looking for password-based key derivation. There is Rfc2898DeriveBytes class that implements it. Rfc2898DeriveBytes takes a password, a salt, and an iteration count, and then generates keys through calls to the GetBytes method. RFC 2898 includes methods for creating a key and initialization vector (IV) from a password and salt. You can … Read more

Specified initialization vector (IV) does not match the block size for this algorithm

The problem is your initialization vector size needs to be 16 bytes. Your initial vector size is 14 bytes. You will need to increase the size of your initial vector by 2 bytes and your code will work. Example: string initVector = “HR$2pIjHR$2pIj12”; You will then get the output with your current code and the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)