[[oktatas:programozás:csharp:dotnetcore|< .Net Core]]
====== Titkosítás ======
* **Szerző:** Sallai András
* Copyright (c) 2024, Sallai András
* Szerkesztve: 2024
* Licenc: [[https://creativecommons.org/licenses/by-sa/4.0/|CC BY-SA 4.0]]
* Web: https://szit.hu
===== Hash algoritmus =====
dotnet new console -o app01
cd app01
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