Table of Contents

Class MinimumStrengthPasswordRule

Namespace
The.Security.Password
Assembly
Instagile.dll
public sealed class MinimumStrengthPasswordRule : IPasswordRule
Inheritance
MinimumStrengthPasswordRule
Implements
Inherited Members

Constructors

MinimumStrengthPasswordRule(PasswordStrength)

public MinimumStrengthPasswordRule(PasswordStrength minimumStrength)

Parameters

minimumStrength PasswordStrength

Properties

Description

A description of this password rule.

public string Description { get; }

Property Value

string

Instructions

A string that may be shown to the user when their password is deemed invalid by this rule.

public string Instructions { get; }

Property Value

string

MinimumStrength

public PasswordStrength MinimumStrength { get; }

Property Value

PasswordStrength

Methods

GetPasswordScore(string, IEnumerable<string>?)

public static double GetPasswordScore(string password, IEnumerable<string>? userDataStrings = null)

Parameters

password string
userDataStrings IEnumerable<string>

Returns

double

GetPasswordStrength(string, IEnumerable<string>?)

public static PasswordStrength GetPasswordStrength(string password, IEnumerable<string>? userDataStrings = null)

Parameters

password string
userDataStrings IEnumerable<string>

Returns

PasswordStrength

GetScoreStrength(double)

public static PasswordStrength GetScoreStrength(double score)

Parameters

score double

Returns

PasswordStrength

IsValid(string, IEnumerable<string>?)

Validate the supplied password against this rule.

public bool IsValid(string password, IEnumerable<string>? userDataStrings = null)

Parameters

password string

The password to validate

userDataStrings IEnumerable<string>

Strings that the application knows about the user supplying the password that this rule may use as part of password validation.

Returns

bool

Whether the supplied password is valid under this rule.

IsValid(PasswordStrength)

public bool IsValid(PasswordStrength strength)

Parameters

strength PasswordStrength

Returns

bool