From 570399318fe9c2afc65f8c8d2fc102fecdb69a02 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sat, 18 Oct 2014 19:05:48 +0700 Subject: [PATCH 1/3] Added missing constants in Zend/Crypt/Key/Derivation/SaltedS2k --- src/Key/Derivation/SaltedS2k.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Key/Derivation/SaltedS2k.php b/src/Key/Derivation/SaltedS2k.php index 763d2f5..6c6f212 100644 --- a/src/Key/Derivation/SaltedS2k.php +++ b/src/Key/Derivation/SaltedS2k.php @@ -15,6 +15,7 @@ class SaltedS2k { protected static $supportedMhashAlgos = array ( + 'adler32' => MHASH_ADLER32, 'md2' => MHASH_MD2, 'md4' => MHASH_MD4, 'md5' => MHASH_MD5, @@ -26,13 +27,14 @@ class SaltedS2k 'ripemd128' => MHASH_RIPEMD128, 'ripemd256' => MHASH_RIPEMD256, 'ripemd320' => MHASH_RIPEMD320, - 'haval128,3' => MHASH_HAVAL128, - 'haval160,3' => MHASH_HAVAL160, - 'haval192,3' => MHASH_HAVAL192, - 'haval224,3' => MHASH_HAVAL224, - 'haval256,3' => MHASH_HAVAL256, - 'tiger128,3' => MHASH_TIGER128, - 'riger160,3' => MHASH_TIGER160, + 'haval128' => MHASH_HAVAL128, + 'haval160' => MHASH_HAVAL160, + 'haval192' => MHASH_HAVAL192, + 'haval224' => MHASH_HAVAL224, + 'haval256' => MHASH_HAVAL256, + 'tiger' => MHASH_TIGER, + 'tiger128' => MHASH_TIGER128, + 'riger160' => MHASH_TIGER160, 'whirpool' => MHASH_WHIRLPOOL, 'snefru256' => MHASH_SNEFRU256, 'gost' => MHASH_GOST, From abaf7103e0d10785166b2417f7a7093367514b42 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sat, 18 Oct 2014 19:07:16 +0700 Subject: [PATCH 2/3] patch spelling --- src/Key/Derivation/SaltedS2k.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Key/Derivation/SaltedS2k.php b/src/Key/Derivation/SaltedS2k.php index 6c6f212..7c102f2 100644 --- a/src/Key/Derivation/SaltedS2k.php +++ b/src/Key/Derivation/SaltedS2k.php @@ -34,7 +34,7 @@ class SaltedS2k 'haval256' => MHASH_HAVAL256, 'tiger' => MHASH_TIGER, 'tiger128' => MHASH_TIGER128, - 'riger160' => MHASH_TIGER160, + 'tiger160' => MHASH_TIGER160, 'whirpool' => MHASH_WHIRLPOOL, 'snefru256' => MHASH_SNEFRU256, 'gost' => MHASH_GOST, From 9706e542b046b0c377b6b2cd610f7a2f07c9392a Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Wed, 10 Dec 2014 06:09:22 +0700 Subject: [PATCH 3/3] added old values for @deprecated --- src/Key/Derivation/SaltedS2k.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Key/Derivation/SaltedS2k.php b/src/Key/Derivation/SaltedS2k.php index 7c102f2..4c64849 100644 --- a/src/Key/Derivation/SaltedS2k.php +++ b/src/Key/Derivation/SaltedS2k.php @@ -27,13 +27,20 @@ class SaltedS2k 'ripemd128' => MHASH_RIPEMD128, 'ripemd256' => MHASH_RIPEMD256, 'ripemd320' => MHASH_RIPEMD320, + 'haval128,3' => MHASH_HAVAL128, // @deprecated use haval128 instead 'haval128' => MHASH_HAVAL128, + 'haval160,3' => MHASH_HAVAL160, // @deprecated use haval160 instead 'haval160' => MHASH_HAVAL160, + 'haval192,3' => MHASH_HAVAL192, // @deprecated use haval192 instead 'haval192' => MHASH_HAVAL192, + 'haval224,3' => MHASH_HAVAL224, // @deprecated use haval224 instead 'haval224' => MHASH_HAVAL224, + 'haval256,3' => MHASH_HAVAL256, // @deprecated use haval256 instead 'haval256' => MHASH_HAVAL256, 'tiger' => MHASH_TIGER, + 'tiger128,3' => MHASH_TIGER128, // @deprecated use tiger128 instead 'tiger128' => MHASH_TIGER128, + 'tiger160,3' => MHASH_TIGER160, // @deprecated use tiger160 instead 'tiger160' => MHASH_TIGER160, 'whirpool' => MHASH_WHIRLPOOL, 'snefru256' => MHASH_SNEFRU256,