From 4cf6ed9e0c83942cba1011d267e57b403e1e2ae1 Mon Sep 17 00:00:00 2001 From: Paolo Date: Wed, 4 Dec 2019 13:27:49 +0100 Subject: [PATCH] Added new CryptLib as a collection of different encryption/hashing algorithms based on phpseclib --- application/libraries/CryptLib.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 application/libraries/CryptLib.php diff --git a/application/libraries/CryptLib.php b/application/libraries/CryptLib.php new file mode 100644 index 000000000..ea19f3e5b --- /dev/null +++ b/application/libraries/CryptLib.php @@ -0,0 +1,28 @@ +setBlockLength(256); + $cipher->setKey($key); + + if ($paddingDisabled === true) $cipher->disablePadding(); + + return $cipher->encrypt($value); + } +}