using System; using System.Security.Cryptography; using System.Text; namespace BookmarkManager { public class Crypto { public static string GetSHA256Hash(string text) { if (string.IsNullOrWhiteSpace(text)) return string.Empty; using (var sha = new SHA256Managed()) { byte[] hash = sha.ComputeHash(Encoding.UTF8.GetBytes(text)); return BitConverter.ToString(hash).Replace("-", string.Empty) + "+" + text.Length.ToString(); } } } }