CapyKit Documentation
  • Introduction
  • Getting Started
  • API Reference
    • CapyKit
      • CapyEventArgs
      • CapyEventHandler
      • CapyEventReporter
      • Color
      • EncryptedValue<T>
      • EventLevel
      • IPasswordAlgorithm
      • NamedColor
      • Password
      • Pbkdf2Algorithm
      • PoolItem<T>
      • Pool<T>
      • PropertyComparer<T, U>
    • CapyKit.Attributes
      • EnumerationAttribute<T>
      • EnumerationDescriptionAttribute
      • ValueFormatAttribute
    • CapyKit.Enumerations
      • MeasurementSystem
    • CapyKit.Extensions
      • EnumerationExtensions
      • LINQExtensions
      • ObjectExtensions
      • StringExtensions
    • CapyKit.Helpers
      • CalculationHelper
      • CompressionHelper
      • EncryptionHelper
      • IEncryptionAlgorithm
      • KeyHelper
      • LanguageHelper
      • SecurityHelper
      • SerializationHelper
      • SettingsHelper
      • ValidCharacterCollection
Search Results for

    Show / Hide Table of Contents
    • Introduction
    • Getting Started
    • API Reference
      • CapyKit
        • CapyEventArgs
        • CapyEventHandler
        • CapyEventReporter
        • Color
        • EncryptedValue<T>
        • EventLevel
        • IPasswordAlgorithm
        • NamedColor
        • Password
        • Pbkdf2Algorithm
        • PoolItem<T>
        • Pool<T>
        • PropertyComparer<T, U>
      • CapyKit.Attributes
        • EnumerationAttribute<T>
        • EnumerationDescriptionAttribute
        • ValueFormatAttribute
      • CapyKit.Enumerations
        • MeasurementSystem
      • CapyKit.Extensions
        • EnumerationExtensions
        • LINQExtensions
        • ObjectExtensions
        • StringExtensions
      • CapyKit.Helpers
        • CalculationHelper
        • CompressionHelper
        • EncryptionHelper
        • IEncryptionAlgorithm
        • KeyHelper
        • LanguageHelper
        • SecurityHelper
        • SerializationHelper
        • SettingsHelper
        • ValidCharacterCollection

    Class Password

    Represents a password with its hash, salt and algorithm used for encryption.

    Inheritance
    object
    Password
    Namespace: CapyKit
    Assembly: CapyKit.dll
    Syntax
    public class Password

    Constructors

    Password(string, byte[], IPasswordAlgorithm, params object[])

    Constructor.

    Declaration
    public Password(string password, byte[] salt, IPasswordAlgorithm algorithm, params object[] args)
    Parameters
    Type Name Description
    string password

    The password to be hashed.

    byte[] salt

    The salt used for encryption.

    IPasswordAlgorithm algorithm

    The algorithm used for password encryption.

    object[] args

    A variable-length parameters list containing arguments to include for the algorithm.

    Properties

    Algorithm

    Gets or sets the algorithm used for password encryption.

    Declaration
    public IPasswordAlgorithm Algorithm { get; }
    Property Value
    Type Description
    IPasswordAlgorithm

    Hash

    Gets or sets the hash of the password.

    Declaration
    public byte[] Hash { get; }
    Property Value
    Type Description
    byte[]

    Pbkdf2Algorithm

    Gets the preconfigured PBKDF2 algorithm.

    Declaration
    public static Pbkdf2Algorithm Pbkdf2Algorithm { get; }
    Property Value
    Type Description
    Pbkdf2Algorithm

    The preconfigured PBKDF2 algorithm.

    Salt

    Gets or sets the salt used for encryption.

    Declaration
    public byte[] Salt { get; }
    Property Value
    Type Description
    byte[]

    Methods

    Equals(object?)

    Determines whether the specified object is equal to the current object.

    Declaration
    public override bool Equals(object? obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with the current object.

    Returns
    Type Description
    bool

    true if the specified object is equal to the current object; otherwise, false.

    Overrides
    object.Equals(object)

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current object.

    Overrides
    object.ToString()

    Operators

    operator ==(Password, Password)

    Declaration
    public static bool operator ==(Password a, Password b)
    Parameters
    Type Name Description
    Password a
    Password b
    Returns
    Type Description
    bool

    operator !=(Password, Password)

    Declaration
    public static bool operator !=(Password a, Password b)
    Parameters
    Type Name Description
    Password a
    Password b
    Returns
    Type Description
    bool
    In this article
    Back to top Generated by DocFX