public static function generateAccessToken($userSession)
 {
     $encryptionKey = 'Qf4pv2cW8ZnHahGukx8K+FtGzTGwoErv7Kt4XArO+xI=';
     $macKey = 'yA2Shj2v8K5Ra/L0oUTZd3jM3FuzMljjjA1KRLrfWyA=';
     $phpcrypt = new Simple($encryptionKey, $macKey);
     return $phpcrypt->encrypt($userSession->id() . $userSession->nombre() . date('YmdHis'));
 }
Example #2
0
 public function encryptString($plaintext)
 {
     return $this->phpCrypt->encrypt($plaintext);
 }