So I am trying to do the following:
1) $session_key
=> randomly generated AES key
2) encrypt $data
=> using AES encryption using $session_key
and $data
3) I skipped some steps in between this to actually make it a secure form of encryption, but obviously, use $session_key
to decrypt the data
I am having trouble figuring out how to randomly generate a secure key to to encrypt the data with.
Can anyone help?