- using System.Linq;
- using System.Security.Cryptography;
- namespace BeatLyrics.Tool.Utils
- {
- internal static class Hasher
- {
- public static string Sha1Hex(byte[] toHash)
- {
- using var sha1 = new SHA1Cng();
- return string.Join("", sha1.ComputeHash(toHash).Select(p => p.ToString("x2")));
- }
- }
- }
|