Show / Hide Table of Contents

Class DefaultPasswordManager

Provides default implementation for password managment functionality based on injectable algorithms and default password strength calculation

Inheritance
System.Object
DisposableObject
ApplicationComponent
Service
Service<ISecurityManagerImplementation>
ServiceWithInstrumentationBase<ISecurityManagerImplementation>
DefaultPasswordManager
Implements
ILocalizedTimeProvider
IPasswordManagerImplementation
IPasswordManager
IApplicationComponent
System.IDisposable
IInstrumentable
IExternallyParameterized
IService
INamed
IConfigurable
Inherited Members
ServiceWithInstrumentationBase<ISecurityManagerImplementation>.ExternalParameters
ServiceWithInstrumentationBase<ISecurityManagerImplementation>.ExternalParametersForGroups(String[])
ServiceWithInstrumentationBase<ISecurityManagerImplementation>.ExternalGetParameter(String, Object, String[])
ServiceWithInstrumentationBase<ISecurityManagerImplementation>.ExternalSetParameter(String, Object, String[])
Service<ISecurityManagerImplementation>.ComponentDirector
Service.CONFIG_NAME_ATTR
Service.Destructor()
Service.ApplicationDontAutoStartService
Service.Status
Service.Running
Service.Name
Service.TimeLocation
Service.LocalizedTime
Service.Configure(IConfigSectionNode)
Service.Start()
Service.SignalStop()
Service.CheckForCompleteStop()
Service.WaitForCompleteStop()
Service.AcceptManagerVisit(Object, DateTime)
Service.UniversalTimeToLocalizedTime(DateTime)
Service.LocalizedTimeToUniversalTime(DateTime)
Service.AbortStart()
Service.DoCheckForCompleteStop()
Service.CheckServiceInactive()
Service.CheckServiceActive()
Service.CheckServiceActiveOrStarting()
Service.DoAcceptManagerVisit(Object, DateTime)
Service.____ObtainPrivateServiceStatusLockObject()
ApplicationComponent.AllComponents
ApplicationComponent.GetAppComponentBySID(UInt64)
ApplicationComponent.GetAppComponentByCommonName(String)
ApplicationComponent.ComponentSID
ApplicationComponent.ComponentStartTime
ApplicationComponent.ComponentCommonName
DisposableObject.DisposeAndNull<T>(T)
DisposableObject.DisposeStarted
DisposableObject.Disposed
DisposableObject.EnsureObjectNotDisposed()
DisposableObject.Dispose()
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)
System.Object.ToString()
Namespace: NFX.Security
Assembly: NFX.dll
Syntax
public class DefaultPasswordManager : ServiceWithInstrumentationBase<ISecurityManagerImplementation>, ILocalizedTimeProvider, IPasswordManagerImplementation, IPasswordManager, IApplicationComponent, IDisposable, IInstrumentable, IExternallyParameterized, IService, INamed, IConfigurable

Constructors

DefaultPasswordManager()

Declaration
public DefaultPasswordManager()

DefaultPasswordManager(ISecurityManagerImplementation)

Declaration
public DefaultPasswordManager(ISecurityManagerImplementation director)
Parameters
Type Name Description
ISecurityManagerImplementation director

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
Type Description
IRegistry<PasswordHashingAlgorithm>

DefaultStrengthLevel

Declaration
[Config(Default = PasswordStrengthLevel.Normal)]
public PasswordStrengthLevel DefaultStrengthLevel { get; set; }
Property Value
Type Description
PasswordStrengthLevel

InstrumentationEnabled

Declaration
[Config(Default = false)]
[ExternalParameter(new string[]{"instrumentation", "pay"})]
public override bool InstrumentationEnabled { get; set; }
Property Value
Type Description
System.Boolean
Overrides
NFX.ServiceModel.ServiceWithInstrumentationBase<NFX.Security.ISecurityManagerImplementation>.InstrumentationEnabled

Methods

AreEquivalent(HashedPassword, HashedPassword)

Declaration
public bool AreEquivalent(HashedPassword a, HashedPassword b)
Parameters
Type Name Description
HashedPassword a
HashedPassword b
Returns
Type Description
System.Boolean

CalculateStrenghtPercent(PasswordFamily, SecureBuffer, Int32)

Declaration
public int CalculateStrenghtPercent(PasswordFamily family, SecureBuffer password, int maxScore = 0)
Parameters
Type Name Description
PasswordFamily family
SecureBuffer password
System.Int32 maxScore
Returns
Type Description
System.Int32

CalculateStrenghtScore(PasswordFamily, SecureBuffer)

Declaration
public int CalculateStrenghtScore(PasswordFamily family, SecureBuffer password)
Parameters
Type Name Description
PasswordFamily family
SecureBuffer password
Returns
Type Description
System.Int32

ComputeHash(PasswordFamily, SecureBuffer, PasswordStrengthLevel)

Declaration
public HashedPassword ComputeHash(PasswordFamily family, SecureBuffer password, PasswordStrengthLevel level = PasswordStrengthLevel.Default)
Parameters
Type Name Description
PasswordFamily family
SecureBuffer password
PasswordStrengthLevel level
Returns
Type Description
HashedPassword

DoAreEquivalent(HashedPassword, HashedPassword)

Declaration
protected virtual bool DoAreEquivalent(HashedPassword a, HashedPassword b)
Parameters
Type Name Description
HashedPassword a
HashedPassword b
Returns
Type Description
System.Boolean

DoCalculateStrenghtScore(PasswordFamily, SecureBuffer)

Declaration
protected virtual int DoCalculateStrenghtScore(PasswordFamily family, SecureBuffer password)
Parameters
Type Name Description
PasswordFamily family
SecureBuffer password
Returns
Type Description
System.Int32

DoComputeHash(PasswordFamily, SecureBuffer, PasswordStrengthLevel)

Declaration
protected virtual HashedPassword DoComputeHash(PasswordFamily family, SecureBuffer password, PasswordStrengthLevel level)
Parameters
Type Name Description
PasswordFamily family
SecureBuffer password
PasswordStrengthLevel level
Returns
Type Description
HashedPassword

DoConfigure(IConfigSectionNode)

Declaration
protected override void DoConfigure(IConfigSectionNode node)
Parameters
Type Name Description
IConfigSectionNode node
Overrides
Service.DoConfigure(IConfigSectionNode)

DoGeneratePassword(PasswordFamily, PasswordRepresentationType, PasswordStrengthLevel)

Declaration
protected virtual IEnumerable<PasswordRepresentation> DoGeneratePassword(PasswordFamily family, PasswordRepresentationType type, PasswordStrengthLevel level)
Parameters
Type Name Description
PasswordFamily family
PasswordRepresentationType type
PasswordStrengthLevel level
Returns
Type Description
System.Collections.Generic.IEnumerable<PasswordRepresentation>

DoSignalStop()

Declaration
protected override void DoSignalStop()
Overrides
Service.DoSignalStop()

DoStart()

Declaration
protected override void DoStart()
Overrides
Service.DoStart()

DoVerify(SecureBuffer, HashedPassword, out Boolean)

Declaration
protected virtual bool DoVerify(SecureBuffer password, HashedPassword hash, out bool needRehash)
Parameters
Type Name Description
SecureBuffer password
HashedPassword hash
System.Boolean needRehash
Returns
Type Description
System.Boolean

DoWaitForCompleteStop()

Declaration
protected override void DoWaitForCompleteStop()
Overrides
Service.DoWaitForCompleteStop()

GeneratePassword(PasswordFamily, PasswordRepresentationType, PasswordStrengthLevel)

Declaration
public IEnumerable<PasswordRepresentation> GeneratePassword(PasswordFamily family, PasswordRepresentationType type, PasswordStrengthLevel level = PasswordStrengthLevel.Default)
Parameters
Type Name Description
PasswordFamily family
PasswordRepresentationType type
PasswordStrengthLevel level
Returns
Type Description
System.Collections.Generic.IEnumerable<PasswordRepresentation>

Register(PasswordHashingAlgorithm)

Declaration
public bool Register(PasswordHashingAlgorithm algo)
Parameters
Type Name Description
PasswordHashingAlgorithm algo
Returns
Type Description
System.Boolean

Unregister(PasswordHashingAlgorithm)

Declaration
public bool Unregister(PasswordHashingAlgorithm algo)
Parameters
Type Name Description
PasswordHashingAlgorithm algo
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
Type Name Description
SecureBuffer password
HashedPassword hash
System.Boolean needRehash
Returns
Type Description
System.Boolean

Implements

ILocalizedTimeProvider
IPasswordManagerImplementation
IPasswordManager
IApplicationComponent
System.IDisposable
IInstrumentable
IExternallyParameterized
IService
INamed
IConfigurable

Extension Methods

MiscUtils.NonNull<T>(T, Func<Exception>, String)
ObjectValueConversion.AsString(Object, String, ConvertErrorHandling)
ObjectValueConversion.AsNonNullOrEmptyString(Object)
ObjectValueConversion.AsLaconicConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsJSONConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsXMLConfig(Object, ConfigSectionNode, ConvertErrorHandling)
ObjectValueConversion.AsChar(Object, Char, ConvertErrorHandling)
ObjectValueConversion.AsNullableChar(Object, Nullable<Char>, ConvertErrorHandling)
ObjectValueConversion.AsByte(Object, Byte, ConvertErrorHandling)
ObjectValueConversion.AsNullableByte(Object, Nullable<Byte>, ConvertErrorHandling)
ObjectValueConversion.AsSByte(Object, SByte, ConvertErrorHandling)
ObjectValueConversion.AsNullableSByte(Object, Nullable<SByte>, ConvertErrorHandling)
ObjectValueConversion.AsShort(Object, Int16, ConvertErrorHandling)
ObjectValueConversion.AsNullableShort(Object, Nullable<Int16>, ConvertErrorHandling)
ObjectValueConversion.AsUShort(Object, UInt16, ConvertErrorHandling)
ObjectValueConversion.AsNullableUShort(Object, Nullable<UInt16>, ConvertErrorHandling)
ObjectValueConversion.AsInt(Object, Int32, ConvertErrorHandling)
ObjectValueConversion.AsNullableInt(Object, Nullable<Int32>, ConvertErrorHandling)
ObjectValueConversion.AsUInt(Object, UInt32, ConvertErrorHandling)
ObjectValueConversion.AsNullableUInt(Object, Nullable<UInt32>, ConvertErrorHandling)
ObjectValueConversion.AsLong(Object, Int64, ConvertErrorHandling)
ObjectValueConversion.AsNullableLong(Object, Nullable<Int64>, ConvertErrorHandling)
ObjectValueConversion.AsULong(Object, UInt64, ConvertErrorHandling)
ObjectValueConversion.AsNullableULong(Object, Nullable<UInt64>, ConvertErrorHandling)
ObjectValueConversion.AsDouble(Object, Double, ConvertErrorHandling)
ObjectValueConversion.AsNullableDouble(Object, Nullable<Double>, ConvertErrorHandling)
ObjectValueConversion.AsFloat(Object, Single, ConvertErrorHandling)
ObjectValueConversion.AsNullableFloat(Object, Nullable<Single>, ConvertErrorHandling)
ObjectValueConversion.AsDecimal(Object, Decimal, ConvertErrorHandling)
ObjectValueConversion.AsNullableDecimal(Object, Nullable<Decimal>, ConvertErrorHandling)
ObjectValueConversion.AsBool(Object, Boolean, ConvertErrorHandling)
ObjectValueConversion.AsNullableBool(Object, Nullable<Boolean>, ConvertErrorHandling)
ObjectValueConversion.AsGUID(Object, Guid, ConvertErrorHandling)
ObjectValueConversion.AsNullableGUID(Object, Nullable<Guid>, ConvertErrorHandling)
ObjectValueConversion.AsDateTime(Object)
ObjectValueConversion.AsDateTime(Object, DateTime, ConvertErrorHandling)
ObjectValueConversion.AsNullableDateTime(Object, Nullable<DateTime>, ConvertErrorHandling)
ObjectValueConversion.AsGDID(Object)
ObjectValueConversion.AsGDID(Object, GDID, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDID(Object, Nullable<GDID>, ConvertErrorHandling)
ObjectValueConversion.AsGDIDSymbol(Object)
ObjectValueConversion.AsGDIDSymbol(Object, GDIDSymbol, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDIDSymbol(Object, Nullable<GDIDSymbol>, ConvertErrorHandling)
ObjectValueConversion.AsTimeSpan(Object)
ObjectValueConversion.AsTimeSpan(Object, TimeSpan, ConvertErrorHandling)
ObjectValueConversion.AsNullableTimeSpan(Object, Nullable<TimeSpan>, ConvertErrorHandling)
ObjectValueConversion.AsEnum<TEnum>(Object, TEnum, ConvertErrorHandling)
ObjectValueConversion.AsNullableEnum<TEnum>(Object, Nullable<TEnum>, ConvertErrorHandling)
ObjectValueConversion.AsUri(Object, Uri, ConvertErrorHandling)
JSONExtensions.ToJSON(Object, JSONWritingOptions)
JSONExtensions.ToJSON(Object, TextWriter, JSONWritingOptions)
JSONExtensions.ToJSON(Object, Stream, JSONWritingOptions, Encoding)
ErlObject.ToErlObject(Object)
ErlObject.ToErlObject(Object, ErlTypeOrder, Boolean)
Back to top Copyright © 2006-2018 Agnicore Inc
Generated by DocFX