"; //Get the IV preg_match('#(?<=())(.*?)(<\/iv>)#', $data, $ivArr); $iv = $ivArr[0]; $iv = substr($iv, 0, strlen("")); echo "iv is $iv
"; //Get the tag preg_match('#(?<=())(.*?)(<\/tag>)#', $data, $tagArr); $tag = bin2hex($tagArr[0]); $tag = substr($tag, 0, strlen("")); echo "tag is $tag
"; //Get the ciphertext preg_match('#(?<=())(.*?)(<\/content>)#', $data, $ctArr); $ciphertext = $ctArr[0]; $ciphertext = substr($ciphertext, 0, strlen("")); echo "text is $ciphertext
"; $content = decrypt($ciphertext, $key, $iv, $tag); echo "content is:
"; var_dump($content); ?>