looking for c# equivalent of php's password-verify() -


i need import bunch of user accounts moodle system written in c#.

moodle uses password_hash() function create hashes of passwords. need able verify these passwords in c#.

in other words looking c# implementation of php's password verify function ( http://www.php.net/manual/en/function.password-verify.php ).

i've googled bit couldn't find close, asking in hopes of avoiding reinventing wheel :-)

thanks!

got it!

first install cryptsharp via nuget package. (use 2.0 "official" package), , way, bcrypt.net didn't work me.

then:

using cryptsharp; bool matches = crypter.checkpassword("password goes here", "hash goes here"); 

note hash should start like: "$2y$..."

works charm! :-)


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -