< .Net Core

Titkosítás

Hash algoritmus

dotnet new console -o app01
cd app01
Program.cs
using System.Security.Cryptography;
 
string text = "titok";
byte[] bytes = System.Text.Encoding.UTF8.GetBytes(text);
 
SHA512 sha512 = SHA512.Create();
 
byte[] hashBytes = sha512.ComputeHash(bytes);
 
string hash = Convert.ToBase64String(hashBytes);
 
Console.WriteLine(hash);
dotnet run