title: Generate a key in PHP for AES 256
body: <p>How can I securely generate a key suitable for hashing data with AES 256 using PHP?</p>
  
  <p>I've tried Googling and found plenty of information about how to encrypt data using AES 256 using PHP, however all of these examples used existing pre-generated keys, wheras I need to generate the key in PHP.</p>