Пример #1
0
        }         // func IsFilterEqualEx

        public static bool PasswordCompare(string testPassword, string passwordHash)
        => Passwords.PasswordCompare(testPassword, passwordHash);
Пример #2
0
 /// <summary>Decode a password from a string.</summary>
 /// <param name="passwordValue">Password value.</param>
 /// <returns></returns>
 /// <remarks>
 /// If the password starts with
 /// - win0x:[windows protected hex-bytes]
 /// - win64:[base64 windows protected byte array]
 /// - plain:[plaintext]
 /// Nothing, it is a plain text password.
 ///
 /// Windows Protected password can be encode with powershell ConvertFrom-SecureString without the key argument.
 /// </remarks>
 public static SecureString DecodePassword(string passwordValue)
 => Passwords.DecodePassword(passwordValue);
Пример #3
0
 /// <summary>Encode a password for decode password.</summary>
 /// <param name="password"></param>
 /// <param name="passwordType"></param>
 /// <returns></returns>
 public static string EncodePassword(SecureString password, string passwordType)
 => Passwords.EncodePassword(password, passwordType);
Пример #4
0
 /// <summary>Parse a hash string to an hash array.</summary>
 /// <param name="passwordHash">Hash string.</param>
 /// <returns>Password hash.</returns>
 public static byte[] ParsePasswordHash(string passwordHash)
 => Passwords.ParsePasswordHash(passwordHash);