ircmaxell / PHP-PasswordLib

A library for generating and validating passwords
373 stars 61 forks source link

Add MediaWiki password hash implementation #6

Closed michael-dev closed 11 years ago

michael-dev commented 11 years ago

This permits to check MediaWiki password hashes.

ircmaxell commented 11 years ago

Looks great, thanks!

ircmaxell commented 11 years ago

@michael-dev Can you provide some tests for this class? So that way it's covered as well?

Thanks

Anthony

michael-dev commented 11 years ago

Hi,

I currently find it difficult to provide a test implementation as I cannot run tests on Ubuntu (vfsStream cannot be installed even after running all pear discovery commands, though some fail) and as it is not clear to me what testLoadFromHash, provideTestCreate, provideTestVerifyFail and provideTestVerifyFailException are supposed to do and how the latter differ. The problem about testing create is I guess that the create method might choose a different salt so create can only be tested using verify. And somehow loadFromHash seems to be related. But there are such a lot of dots in the example strings (and the numbers don't make sense to me either), that I guess they have some meaning - but which? Further I don't see a verify-is-ok test method.

Regards,