Search Results for

    Show / Hide Table of Contents
    View Source

    Class LegacyPasswordSecurity

    Handles password hashing and formatting for legacy hashing algorithms.

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.Security
    Assembly: Umbraco.Core.dll
    Syntax
    public class LegacyPasswordSecurity
    Remarks

    Should probably be internal.

    Methods

    View Source

    FormatPasswordForStorage(String, String, String)

    Declaration
    public string FormatPasswordForStorage(string algorithmType, string hashedPassword, string salt)
    Parameters
    Type Name Description
    System.String algorithmType
    System.String hashedPassword
    System.String salt
    Returns
    Type Description
    System.String
    View Source

    GenerateSalt()

    Declaration
    public static string GenerateSalt()
    Returns
    Type Description
    System.String
    View Source

    HashNewPassword(String, String, out String)

    Create a new password hash and a new salt

    Declaration
    public string HashNewPassword(string algorithm, string newPassword, out string salt)
    Parameters
    Type Name Description
    System.String algorithm

    The hashing algorithm for the password.

    System.String newPassword
    System.String salt
    Returns
    Type Description
    System.String
    View Source

    HashPasswordForStorage(String, String)

    Declaration
    public string HashPasswordForStorage(string algorithmType, string password)
    Parameters
    Type Name Description
    System.String algorithmType
    System.String password
    Returns
    Type Description
    System.String
    View Source

    ParseStoredHashPassword(String, String, out String)

    Parses out the hashed password and the salt from the stored password string value

    Declaration
    public string ParseStoredHashPassword(string algorithm, string storedString, out string salt)
    Parameters
    Type Name Description
    System.String algorithm

    The hashing algorithm for the stored password.

    System.String storedString
    System.String salt

    returns the salt

    Returns
    Type Description
    System.String
    View Source

    SupportHashAlgorithm(String)

    Declaration
    public bool SupportHashAlgorithm(string algorithm)
    Parameters
    Type Name Description
    System.String algorithm
    Returns
    Type Description
    System.Boolean
    View Source

    VerifyLegacyHashedPassword(String, String)

    Verify a legacy hashed password (HMACSHA1)

    Declaration
    public bool VerifyLegacyHashedPassword(string password, string dbPassword)
    Parameters
    Type Name Description
    System.String password
    System.String dbPassword
    Returns
    Type Description
    System.Boolean
    View Source

    VerifyPassword(String, String, String)

    Verifies if the password matches the expected hash+salt of the stored password string

    Declaration
    public bool VerifyPassword(string algorithm, string password, string dbPassword)
    Parameters
    Type Name Description
    System.String algorithm

    The hashing algorithm for the stored password.

    System.String password

    The password.

    System.String dbPassword

    The value of the password stored in a data store.

    Returns
    Type Description
    System.Boolean
    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • FormatPasswordForStorage(String, String, String)
      • GenerateSalt()
      • HashNewPassword(String, String, out String)
      • HashPasswordForStorage(String, String)
      • ParseStoredHashPassword(String, String, out String)
      • SupportHashAlgorithm(String)
      • VerifyLegacyHashedPassword(String, String)
      • VerifyPassword(String, String, String)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX