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 SourceGenerateSalt()
Declaration
public static string GenerateSalt()
Returns
Type | Description |
---|---|
System.String |
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 |
SupportHashAlgorithm(String)
Declaration
public bool SupportHashAlgorithm(string algorithm)
Parameters
Type | Name | Description |
---|---|---|
System.String | algorithm |
Returns
Type | Description |
---|---|
System.Boolean |
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 |
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 |