Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0

Bug #193 Crypt_MSCHAPv1::ntPasswordhash() handles strings differently than integers
Submitted: 2003-11-04 16:56 UTC
From: mike Assigned: mbretter
Status: Closed Package: Crypt_CHAP
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2003-11-04 16:56 UTC] mike
Description: ------------ Crypt_MSCHAPv1::ntPasswordhash() handles strings differently than integers. You'll get 2 different hashes for the same passwd. A setType($str, 'string'); in Crypt_MSCHAPv1::str2unicode($str) could fix this, IMHO. Reproduce code: --------------- $m = &new Crypt_MSCHAPv1; echo strToUpper(bin2hex($m->ntPasswordhash('123'))) . "\n"; echo strToUpper(bin2hex($m->ntPasswordhash(123))) . "\n"; Expected result: ---------------- 3DBDE697D71690A769204BEB12283678 3DBDE697D71690A769204BEB12283678 Actual result: -------------- 3DBDE697D71690A769204BEB12283678 D4DA020AEDCD249A7A418867A6F0C18A

Comments