开发者

Tank auth to use md5

开发者 https://www.devze.com 2023-03-12 02:14 出处:网络
I am working on a registration system for a 3rd party server, and (though tank auth\'s hashing is great), I need an md5 (so the third party software can check against it).

I am working on a registration system for a 3rd party server, and (though tank auth's hashing is great), I need an md5 (so the third party software can check against it). Is there an easy way to do this?

开发者_高级运维

Thanks, Max


If you want to do it the right way, you would write your own hash functions to use in Tank_Auth and remove the current ones.

If you don't want to do it the right way, Tank_Auth uses the included phpass PasswordHash class to hash and validate passwords. Only two functions are called from the Tank_Auth library: CheckPassword and HashPassword. Make a backup, and rewrite these two functions to use md5() instead. You may simply ignore the configuration and other PasswordHash methods.


PHP has a built in md5 hashing function ( md5() ), although I'd recommend sha1 ( sha1() ) over md5.

edit: ah, you're required to use an md5 hash is what you're saying? then just md5()

0

精彩评论

暂无评论...
验证码 换一张
取 消