Files
yavsc/Yavsc/Helpers/OAuthHelpers.cs
2016-06-12 01:32:51 +02:00

18 lines
463 B
C#

using System;
using System.Security.Cryptography;
namespace Yavsc.Helpers {
public class Helper
{
public static string GetHash(string input)
{
HashAlgorithm hashAlgorithm = new SHA256CryptoServiceProvider();
byte[] byteValue = System.Text.Encoding.UTF8.GetBytes(input);
byte[] byteHash = hashAlgorithm.ComputeHash(byteValue);
return Convert.ToBase64String(byteHash);
}
}
}