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'));
 }
示例#2
0
文件: Vault.php 项目: aoepeople/vault
 public function encryptString($plaintext)
 {
     return $this->phpCrypt->encrypt($plaintext);
 }