Пример #1
0
 public function testCryptDecrypt()
 {
     $str = 'Ceci est un test hyper important !!';
     $ec = new EdnaoCryptography();
     $encoded = $ec->crypt($str);
     $decoded = $ec->decrypt($encoded);
     $this->assertNotEmpty($encoded);
     $this->assertEquals($str, $decoded);
 }
Пример #2
0
 public function getTokenCrypt(Token $token)
 {
     return rawurlencode($this->ednaoCrypt->crypt($token->serialize()));
 }