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

    Interface IPasswordAlgorithm

    Defines the contract for password encryption algorithms.

    Namespace: CapyKit
    Assembly: CapyKit.dll
    Syntax
    public interface IPasswordAlgorithm

    Properties

    AlgorithmName

    Gets the name of the algorithm.

    Declaration
    string AlgorithmName { get; }
    Property Value
    Type Description
    string

    Methods

    Compare(string, byte[], params object[])

    Compares the given plaintext password with an encrypted value using PBKDF2 algorithm.

    Declaration
    bool Compare(string password, byte[] encryptedValue, params object[] args)
    Parameters
    Type Name Description
    string password

    The plaintext password to compare.

    byte[] encryptedValue

    The encrypted value to compare against.

    object[] args

    Additional arguments for the encryption process, such as salt and length.

    Returns
    Type Description
    bool

    True if the given password matches the encryptedValue, false if they are different.

    Encrypt(string, params object[])

    Encrypts the given password using a defined algorithm.

    Declaration
    byte[] Encrypt(string password, params object[] args)
    Parameters
    Type Name Description
    string password

    The plaintext password.

    object[] args

    Additional arguments for the encryption process, such as salt and length.

    Returns
    Type Description
    byte[]

    A byte array with the hashed password.

    In this article
    Back to top Generated by DocFX