Exemplo n.º 1
0
 function key_make()
 {
     $cookie = so_cookie::make('so_user_key');
     $key = $cookie->value;
     if (!$key) {
         $key = so_crypt::generateKey();
         $cookie->value = $key;
     }
     return $key;
 }
Exemplo n.º 2
0
 function get_key($key)
 {
     if (isset($key)) {
         return $key;
     }
     $cookie = so_cookie::make('so_user_key');
     $key = $cookie->value;
     if (!$key) {
         $key = so_crypt::generateKey();
         $cookie->value = $key;
     }
     return $key;
 }