From e3743176e79cf7b8ae1d2d30ea08c290f32c0b2e Mon Sep 17 00:00:00 2001 From: "OakBaron (queso)" <21106956+OakBaron@users.noreply.github.com> Date: Sun, 21 Apr 2019 13:57:07 -0400 Subject: [PATCH] Brought decryptFunc up to date with the rest of the site --- decryptFunc.php | 48 ++++++++++++++++++++++++++++++++++-------------- style.css | 3 +++ 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/decryptFunc.php b/decryptFunc.php index 6a9e615..b648272 100644 --- a/decryptFunc.php +++ b/decryptFunc.php @@ -1,14 +1,34 @@ -iv); - $tag = hex2bin($data->tag); - $ciphertext = $data->content; - - echo "Your decrypted content:
"; - echo decrypt($ciphertext, $key, $iv, $tag);; -?> \ No newline at end of file + + + + + Encrytion and stuff + + + + + iv); + $tag = hex2bin($data->tag); + $ciphertext = $data->content; + $dec = decrypt($ciphertext, $key, $iv, $tag); + + if($dec != ""){ + echo "

Your decrypted content:

"; + echo "

".$dec."

"; + }else{ + echo "

Error

"; + echo "

Your content could not be decrypted.
Wrong password, maybe?

"; + } + ?> +

+

Encrypt another file

+

Decrypt another file

+ + diff --git a/style.css b/style.css index fd05d5a..84159d3 100644 --- a/style.css +++ b/style.css @@ -40,6 +40,9 @@ textarea{ font-size: 0.9em; color: inherit; } +#decCont{ + font-family: monospace; +} button{ display: block; margin-left: auto;