From bdc1cc675995784d899f6288ce35987977bd8e5d Mon Sep 17 00:00:00 2001 From: BrainFooLong Date: Tue, 13 Jun 2023 10:59:00 +0200 Subject: [PATCH] updated readme removed unused var_dump --- README.md | 12 +++++++----- src/CryptoJsAes.php | 4 +--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6b59bb7..e226a7c 100644 --- a/README.md +++ b/README.md @@ -79,12 +79,14 @@ Also, there's a good article about PHP issues/info related to this library: http * Does not work with following php.ini option enabled: http://php.net/manual/en/mbstring.overload.php ## Changelog -* 2.2.0 - 13\. June 2023 +* 2.2.0 - 13. June 2023 + * fixed implicit true to 1 conversion by using proper OPENSSL flag (thx @benjumanji) * added tests for php and js - * show a warning for passphrases with non ASCII characters, as it is and was never supported -* 2.1.1 - 15\. January 2021 + * added a js console warning for passphrases with non ASCII characters, as it is and was never supported + * minor improved php decrypt to avoid one useless hash cycle +* 2.1.1 - 15. January 2021 * just a few documentation and composer fixes -* 2.1.0 - 30\. December 2020 +* 2.1.0 - 30. December 2020 * added quick decrypt and encrypt functions: `CryptoJSAesJson.encrypt()` and `CryptoJSAesJson.decrypt()` - See examples for more information -* 7\. April 2020 +* 2.x.x - 7. April 2020 * Upgraded project to namespaces diff --git a/src/CryptoJsAes.php b/src/CryptoJsAes.php index 288210c..72af8b8 100644 --- a/src/CryptoJsAes.php +++ b/src/CryptoJsAes.php @@ -4,8 +4,6 @@ use function strlen; -use function var_dump; - use const OPENSSL_RAW_DATA; /** @@ -56,7 +54,7 @@ public static function decrypt(string $jsonStr, string $passphrase) $md5[0] = md5($concatedPassphrase, true); $result = $md5[0]; $i = 1; - while(strlen($result) < 32) { + while (strlen($result) < 32) { $md5[$i] = md5($md5[$i - 1] . $concatedPassphrase, true); $result .= $md5[$i]; $i++;