initial commit
This commit is contained in:
14
decryptFunc.php
Normal file
14
decryptFunc.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
require "enc.php";
|
||||
$words = file_get_contents($_FILES["encDoc"]["tmp_name"]);
|
||||
$data = simplexml_load_string($words) or die("Couldn't make object");
|
||||
|
||||
//Get the XML info in variables (hex2bin the iv and tag)
|
||||
$key = $_POST["key"];
|
||||
$iv = hex2bin($data->iv);
|
||||
$tag = hex2bin($data->tag);
|
||||
$ciphertext = $data->content;
|
||||
|
||||
echo "Your decrypted content:<br>";
|
||||
echo decrypt($ciphertext, $key, $iv, $tag);;
|
||||
?>
|
||||
Reference in New Issue
Block a user