Felhasználói eszközök

Eszközök a webhelyen


oktatas:programozas:csharp:dotnetcore:titkositas

Ez a dokumentum egy előző változata!


< .Net Core

Titkosítás

Hash algoritmus

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);
oktatas/programozas/csharp/dotnetcore/titkositas.1733435833.txt.gz · Utolsó módosítás: 2024/12/05 22:57 szerkesztette: admin