fixed decrypting

This commit is contained in:
Luke Ogburn
2019-04-08 23:50:37 -04:00
parent 686085e935
commit 38ba5a20b1
3 changed files with 35 additions and 76 deletions

View File

@@ -1,7 +1,7 @@
<?php
require "enc.php";
$enc = encrypt($_POST["words"], $_POST["key"]);
$content = '<iv>'.$enc[1].'</iv>'.'<tag>'.$enc[2].'</tag>'.'<content>'.$enc[0]."</content>";
$content = '<iv>'.bin2hex($enc[1]).'</iv>'.'<tag>'.bin2hex($enc[2]).'</tag>'.'<content>'.$enc[0]."</content>";
header('Content-type: text/plain');
header('Content-Disposition: attachment; filename="encrypted.txt"');