Files
HealthAppRepositoryB/tools/PasswordHash/Program.cs
T

12 lines
386 B
C#

using Microsoft.AspNetCore.Identity;
// Read from standard input, never from a command-line argument or environment dump.
var password = Console.ReadLine();
if (string.IsNullOrEmpty(password))
{
Console.Error.WriteLine("Supply a nonempty password on standard input.");
return 1;
}
Console.WriteLine(new PasswordHasher<object>().HashPassword(new object(), password));
return 0;