HashPassword() 공개 정적인 메소드

Get MD5 hashed/encrypted representation of the password and returns a Base64 encoded string of the hash. This is a one-way hash.
Passwords are case sensitive now. Before they weren't.
public static HashPassword ( string password ) : string
password string Supplied Password
리턴 string
예제 #1
0
        public virtual void UpdatePassword(string password)
        {
            if (String.IsNullOrEmpty(password))
            {
                throw new ArgumentNullException("password");
            }
            var blog = SubtextContext.Blog;

            blog.Password = blog.IsPasswordHashed ? SecurityHelper.HashPassword(password) : password;
            SubtextContext.Repository.UpdateBlog(blog);
        }
예제 #2
0
 public override void UpdatePassword(string password)
 {
     _hostInfo.Password = Config.Settings.UseHashedPasswords ? SecurityHelper.HashPassword(password, _hostInfo.Salt) : password;
     HostInfo.UpdateHost(_repository, _hostInfo);
 }
예제 #3
0
 protected bool IsValidPassword(string password, string storedPassword, bool hashed, string salt)
 {
     return(storedPassword == (hashed ? SecurityHelper.HashPassword(password, salt) : password));
 }