cookieEncrypt() public method

Encryption using openssl's AES or phpseclib's AES (phpseclib uses mcrypt when it is available)
public cookieEncrypt ( string $data, string $secret ) : string
$data string original data
$secret string the secret
return string the encrypted result
 /**
  * Test for PMA\libraries\plugins\auth\AuthenticationConfig::cookieEncrypt
  *
  * @return void
  */
 public function testCookieEncrypt()
 {
     $this->object->setIV('testiv09testiv09');
     // works with the openssl extension active or inactive
     $this->assertEquals('{"iv":"dGVzdGl2MDl0ZXN0aXYwOQ==","mac":"347aa45ae1ade00c980f31129ec2defef18b2bfd","payload":"YDEaxOfP9nD9q\\/2pC6hjfQ=="}', $this->object->cookieEncrypt('data123', 'sec321'));
 }
 /**
  * Test for PMA\libraries\plugins\auth\AuthenticationConfig::cookieEncrypt
  *
  * @return void
  */
 public function testCookieEncrypt()
 {
     $this->object->setIV('testiv09testiv09');
     // works with the openssl extension active or inactive
     $this->assertEquals('+coP/up/ZBTBwbiEpCUVXQ==', $this->object->cookieEncrypt('data123', 'sec321'));
 }
 /**
  * Test for PMA\libraries\plugins\auth\AuthenticationConfig::cookieEncrypt
  *
  * @return void
  */
 public function testCookieEncrypt()
 {
     $this->object->setIV('testiv09testiv09');
     // works with the openssl extension active or inactive
     $this->assertEquals('{"iv":"dGVzdGl2MDl0ZXN0aXYwOQ==","mac":"34367a80e4276906637b5eaecf8c3931547aae68","payload":"+coP\\/up\\/ZBTBwbiEpCUVXQ=="}', $this->object->cookieEncrypt('data123', 'sec321'));
 }