Added the first part of allowing the user to reset their password.
This commit is contained in:
@@ -58,23 +58,17 @@ namespace SecureCore.Authentication
|
||||
}
|
||||
}
|
||||
|
||||
public static string HashStringData(string data, byte[] salt = null)
|
||||
{
|
||||
return data;
|
||||
|
||||
if (salt == null) salt = new byte[0];
|
||||
|
||||
return GetHash(data, salt);
|
||||
}
|
||||
|
||||
public static string HashStringData(string data, string salt = "")
|
||||
{
|
||||
return data;
|
||||
|
||||
var saltBytes = new byte[0];
|
||||
|
||||
if(!string.IsNullOrEmpty(salt))
|
||||
saltBytes = Convert.FromBase64String(salt);
|
||||
else
|
||||
{
|
||||
saltBytes = new byte[SaltSize];
|
||||
ByteGenerator.GetRandomBytes(ref saltBytes);
|
||||
}
|
||||
|
||||
return GetHash(data, saltBytes);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user