using System;
using System.Security.Cryptography;
using System.Text;

namespace MECF.Framework.Common.Utilities
{
    public static class Sha256
    {
        public static string EncodeString(string strSource)
        {
            using var sha =  SHA256.Create();
            var hashBytes = sha.ComputeHash(Encoding.UTF8.GetBytes(strSource));
            var hashStr = BitConverter.ToString(hashBytes).Replace("-", "");
            return hashStr;
        }
    }
}
