The session key is used to protect the content key. The following code demonstrates how to create a session key, but leaves out the details of random key generation.