public function decrypt($input)
{
// Decode the IV + data
$input = base64_decode($input);
// Remove the IV
$iv = substr($input, 0, Cipher::IV_SIZE);
// Return Decrypted Data
return openssl_decrypt(substr($input, Cipher::IV_SIZE), "AES-256-CBC", $this->secretKey, 0, $iv);
}
/** * Helper method to decrypt data using clientSecret as key * * @param $data * @return string */ public function decrypt($data) { return $this->cipher->decrypt($data); }