/** * @get encryption key * @access public * @return string */ public function get_encryption_key() { // if encryption key has not been set if (empty(self::$_encryption_key)) { // retrieve encryption_key from db self::$_encryption_key = get_option('ee_encryption_key'); // WHAT?? No encryption_key in the db ?? if (self::$_encryption_key == FALSE) { // let's make one. And md5 it to make it just the right size for a key $new_key = md5(self::generate_random_string()); // now save it to the db for later add_option('ee_encryption_key', $new_key); // here's the key - FINALLY ! self::$_encryption_key = $new_key; } } return self::$_encryption_key; }