Decryption using openssl's AES or phpseclib's AES
(phpseclib uses mcrypt when it is available)
/** * Test for PMA\libraries\plugins\auth\AuthenticationConfig::cookieDecrypt * * @return void */ public function testCookieDecrypt() { $this->object->setIV('testiv09testiv09'); // works with the openssl extension active or inactive $this->assertEquals('data123', $this->object->cookieDecrypt('+coP/up/ZBTBwbiEpCUVXQ==', 'sec321')); }
/** * Test for PMA\libraries\plugins\auth\AuthenticationConfig::cookieDecrypt * * @return void */ public function testCookieDecryptInvalid() { // works with the openssl extension active or inactive $this->assertEquals(false, $this->object->cookieDecrypt('{"iv":0,"mac":0,"payload":0}', 'sec321')); }