public function encryptBase64($text, $key = null, $safe = false) { return parent::encryptBase64($text, $key, $safe); }
/** * Tests the encryption base 64 * * @author Nikolaos Dimopoulos <*****@*****.**> * @since 2014-10-17 */ public function testCryptEncryptBase64() { $this->specify("encryption base 64does not return correct results", function () { $crypt = new PhTCrypt(); $crypt->setPadding(PhTCrypt::PADDING_ANSI_X_923); $key = substr('phalcon notice 13123123', 0, 16); $expected = 'https://github.com/phalcon/cphalcon/issues?state=open'; $encrypted = $crypt->encryptBase64($expected, substr($key, 0, 16)); $actual = $crypt->decryptBase64($encrypted, $key); expect($actual)->equals($expected); $encrypted = $crypt->encryptBase64($expected, $key, true); $actual = $crypt->decryptBase64($encrypted, $key, true); expect($actual)->equals($expected); }); }