Ejemplo n.º 1
0
 /**
  * @description DES Cryptography Implementation
  */
 function descrypto()
 {
     $c = new CryptoCipher(MCRYPT_DES, 'hello');
     $e = $c->encrypt('helloworld');
     $this->assertEquals($e, 'q8dBduudWGAuIw4LPXMCFQ==');
     $this->assertEquals($c->decrypt($e), 'helloworld');
 }
Ejemplo n.º 2
0
 private function decryptCookie($data)
 {
     $key = config::get('lepton.cookieauth.key');
     $c = new CryptoCipher('3DES', $key);
     $plain = $c->decrypt($data, true);
     return unserialize($plain);
 }