/** * @depends testSafeBase64Encode * @dataProvider providerSafeBase64Random */ public function testSafeBase64Random($string) { $encode = safe_base64_encode($string); $decode = safe_base64_decode($encode); $this->assertSame($decode, $string); }
function decrypt($encrypted, $key) { $key = pad_key($key); return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, safe_base64_decode($encrypted), MCRYPT_MODE_ECB), "\t\n\r\v"); }
function decrypt($encrypted, $key) { return mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, safe_base64_decode($encrypted), MCRYPT_MODE_ECB); }