Class LegacyPasswordSecurity
Handles password hashing and formatting for legacy hashing algorithms.
Inheritance
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 |
|---|---|
| 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 |
|---|---|---|
| string | algorithm | The hashing algorithm for the stored password. |
| string | storedString | |
| string | salt | returns the salt |
Returns
| Type | Description |
|---|---|
| string |
SupportHashAlgorithm(string)
Declaration
public bool SupportHashAlgorithm(string algorithm)
Parameters
| Type | Name | Description |
|---|---|---|
| string | algorithm |
Returns
| Type | Description |
|---|---|
| bool |
VerifyLegacyHashedPassword(string, string)
Verify a legacy hashed password (HMACSHA1)
Declaration
public bool VerifyLegacyHashedPassword(string password, string dbPassword)
Parameters
| Type | Name | Description |
|---|---|---|
| string | password | |
| string | dbPassword |
Returns
| Type | Description |
|---|---|
| bool |
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 |
|---|---|---|
| string | algorithm | The hashing algorithm for the stored password. |
| string | password | The password. |
| string | dbPassword | The value of the password stored in a data store. |
Returns
| Type | Description |
|---|---|
| bool |