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); }
public function getTokenCrypt(Token $token) { return rawurlencode($this->ednaoCrypt->crypt($token->serialize())); }