Class DefaultPasswordManager
Provides default implementation for password management functionality based on injectable algorithms and default password strength calculation
Inheritance
System.Object
DefaultPasswordManager
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Azos.dll
Syntax
public class DefaultPasswordManager : DaemonWithInstrumentation<ISecurityManagerImplementation>, ILocalizedTimeProvider, IPasswordManagerImplementation, IPasswordManager, IDisposable, IInstrumentable, IExternallyParameterized, IDaemon, IDaemonView, IApplicationComponent, INamed, IConfigurable
Constructors
DefaultPasswordManager(IApplication)
Declaration
public DefaultPasswordManager(IApplication app)
Parameters
DefaultPasswordManager(ISecurityManagerImplementation)
Declaration
public DefaultPasswordManager(ISecurityManagerImplementation director)
Parameters
Fields
CONFIG_ALGORITHM_SECTION
Declaration
public const string CONFIG_ALGORITHM_SECTION = "algo"
Field Value
Type |
Description |
System.String |
|
DEFAULT_COMMON_WORDS
Declaration
public static readonly string[] DEFAULT_COMMON_WORDS
Field Value
Type |
Description |
System.String[] |
|
TOP_SCORE_ABOVE_NORMAL
Declaration
public const int TOP_SCORE_ABOVE_NORMAL = 293
Field Value
Type |
Description |
System.Int32 |
|
TOP_SCORE_BELOW_NORMAL
Declaration
public const int TOP_SCORE_BELOW_NORMAL = 208
Field Value
Type |
Description |
System.Int32 |
|
TOP_SCORE_MAXIMUM
Declaration
public const int TOP_SCORE_MAXIMUM = 350
Field Value
Type |
Description |
System.Int32 |
|
TOP_SCORE_MINIMUM
Declaration
public const int TOP_SCORE_MINIMUM = 180
Field Value
Type |
Description |
System.Int32 |
|
TOP_SCORE_NORMAL
Declaration
public const int TOP_SCORE_NORMAL = 237
Field Value
Type |
Description |
System.Int32 |
|
Properties
Algorithms
Declaration
public IRegistry<PasswordHashingAlgorithm> Algorithms { get; }
Property Value
ComponentLogTopic
Declaration
public override string ComponentLogTopic { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
DefaultStrengthLevel
Declaration
[Config(Default = PasswordStrengthLevel.Normal)]
public PasswordStrengthLevel DefaultStrengthLevel { get; set; }
Property Value
InstrumentationEnabled
Declaration
[Config(Default = false)]
[ExternalParameter(new string[]{"instrumentation", "pay"})]
public override bool InstrumentationEnabled { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
Azos.Apps.DaemonWithInstrumentation<Azos.Security.ISecurityManagerImplementation>.InstrumentationEnabled
Methods
AreEquivalent(HashedPassword, HashedPassword)
Declaration
public bool AreEquivalent(HashedPassword a, HashedPassword b)
Parameters
Returns
Type |
Description |
System.Boolean |
|
CalculateStrenghtPercent(PasswordFamily, SecureBuffer, Int32)
Declaration
public int CalculateStrenghtPercent(PasswordFamily family, SecureBuffer password, int maxScore = 0)
Parameters
Returns
Type |
Description |
System.Int32 |
|
CalculateStrenghtScore(PasswordFamily, SecureBuffer)
Declaration
public int CalculateStrenghtScore(PasswordFamily family, SecureBuffer password)
Parameters
Returns
Type |
Description |
System.Int32 |
|
ComputeHash(PasswordFamily, SecureBuffer, PasswordStrengthLevel)
Declaration
public HashedPassword ComputeHash(PasswordFamily family, SecureBuffer password, PasswordStrengthLevel level = PasswordStrengthLevel.Default)
Parameters
Returns
DoAreEquivalent(HashedPassword, HashedPassword)
Declaration
protected virtual bool DoAreEquivalent(HashedPassword a, HashedPassword b)
Parameters
Returns
Type |
Description |
System.Boolean |
|
DoCalculateStrenghtScore(PasswordFamily, SecureBuffer)
Declaration
protected virtual int DoCalculateStrenghtScore(PasswordFamily family, SecureBuffer password)
Parameters
Returns
Type |
Description |
System.Int32 |
|
DoComputeHash(PasswordFamily, SecureBuffer, PasswordStrengthLevel)
Declaration
protected virtual HashedPassword DoComputeHash(PasswordFamily family, SecureBuffer password, PasswordStrengthLevel level)
Parameters
Returns
Declaration
protected override void DoConfigure(IConfigSectionNode node)
Parameters
Overrides
DoGeneratePassword(PasswordFamily, PasswordRepresentationType, PasswordStrengthLevel)
Declaration
protected virtual IEnumerable<PasswordRepresentation> DoGeneratePassword(PasswordFamily family, PasswordRepresentationType type, PasswordStrengthLevel level)
Parameters
Returns
DoSignalStop()
Declaration
protected override void DoSignalStop()
Overrides
DoStart()
Declaration
protected override void DoStart()
Overrides
DoVerify(SecureBuffer, HashedPassword, out Boolean)
Declaration
protected virtual bool DoVerify(SecureBuffer password, HashedPassword hash, out bool needRehash)
Parameters
Returns
Type |
Description |
System.Boolean |
|
DoWaitForCompleteStop()
Declaration
protected override void DoWaitForCompleteStop()
Overrides
GeneratePassword(PasswordFamily, PasswordRepresentationType, PasswordStrengthLevel)
Declaration
public IEnumerable<PasswordRepresentation> GeneratePassword(PasswordFamily family, PasswordRepresentationType type, PasswordStrengthLevel level = PasswordStrengthLevel.Default)
Parameters
Returns
Register(PasswordHashingAlgorithm)
Declaration
public bool Register(PasswordHashingAlgorithm algo)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Unregister(PasswordHashingAlgorithm)
Declaration
public bool Unregister(PasswordHashingAlgorithm algo)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Unregister(String)
Declaration
public bool Unregister(string algoName)
Parameters
Type |
Name |
Description |
System.String |
algoName |
|
Returns
Type |
Description |
System.Boolean |
|
Verify(SecureBuffer, HashedPassword, out Boolean)
Declaration
public bool Verify(SecureBuffer password, HashedPassword hash, out bool needRehash)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Implements
System.IDisposable
Extension Methods