Title: Tutorial for using encryption
Last modified: February 2, 2018

---

# Tutorial for using encryption

 *  Resolved [Alex](https://wordpress.org/support/users/hempsworth/)
 * (@hempsworth)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/tutorial-for-using-encryption/)
 * Hi,
 * Do you have a tutorial or quick ‘how to’ for using the `WP_SESSION_ENC_KEY` functionality?
 * Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Eric Mann](https://wordpress.org/support/users/ericmann/)
 * (@ericmann)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/tutorial-for-using-encryption/#post-9934636)
 * I should add this to the FAQ, but there are some quick instructions listed with
   the underlying Sessionz library: [https://github.com/ericmann/sessionz#encryptionhandler](https://github.com/ericmann/sessionz#encryptionhandler).
   Copying here for simplicity …
 * Sessions stored on disk (the default implementation) or in a separate storage
   system (Memcache, MySQL, or similar) should be encrypted at rest. This handler
   will automatically encrypt any information passing through it on write and decrypt
   data on read. It does not store data on its own.
 * This handler requires a symmetric encryption key when it’s instantiated. This
   key should be an ASCII-safe string, 32 bytes in length. You can easily use Defuse
   PHP Encryption (a dependency of this library) to generate a new key:
 *     ```
       $rawKey = Defuse\Crypto\Key::createNewRandomKey();
       $key = $rawKey->saveToAsciiSafeString();
       ```
   
 *  Thread Starter [Alex](https://wordpress.org/support/users/hempsworth/)
 * (@hempsworth)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/tutorial-for-using-encryption/#post-9936159)
 * Thanks for your quick reply!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Tutorial for using encryption’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-session-manager_272e38.svg)
 * [WP Session Manager](https://wordpress.org/plugins/wp-session-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-session-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-session-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-session-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-session-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-session-manager/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Alex](https://wordpress.org/support/users/hempsworth/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/tutorial-for-using-encryption/#post-9936159)
 * Status: resolved