开发者

NHibernate MySQL Password Function

I am trying to create a custom application that allows for adding and removing and changing passwords of users. How would I c开发者_高级运维reate the hash that MySQL uses to stored password in?

I know MySQL has a Password() function but I can't figure out how to use this function in NHibernate.

Anyone know how to do this?


What kind of users are you talking about, mysql users or application users?

If you want to set the password of a mysql user, you don't need to use the password() function at all.

CREATE USER:

create user 'scott' identified by 'tiger';

UPDATE PASSWORD:

grant usage on *.* to 'scott' identified by 'newpassword';

If you are talking about application users, don't use the mysql password() function. Use something like sha1(), md5(), etc.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜