public function testEncryptDecrypt() { $enc = new Encrypt('kknmknmknmknmnm'); $string = 'hello world'; $string_enc = $enc->encrypt($string); $this->assertEquals($string, $enc->decrypt($string_enc)); }
protected function decrypt($string) { $crypt = new Encrypt($this->token); return $crypt->decrypt(preg_replace('/ /', '+', $string)); }