/** * @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'); }
private function decryptCookie($data) { $key = config::get('lepton.cookieauth.key'); $c = new CryptoCipher('3DES', $key); $plain = $c->decrypt($data, true); return unserialize($plain); }