开发者

SHA1 Using php and .net

Can u pls help me for the below issue.

开发者_如何学PythonI have sha1 value in mssql table (Password is encrypted using algorithm SHA1 which provided in Microsoft .Net library) .

I created one php application, in that i need to compare these encrypted value.

Thanks


I suppose you want to compare a user provided password with the hashed value from the database. In that case, just use the native php sha1 function:

if($hashedPasswordFromDB == sha1($plainUserProvidedPassword)) {
    echo "Approved!";
}
else {
    echo "Denied!";
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜