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().HashPassword(new object(), password)); return 0;