using System;
using System.Security.Cryptography;
using System.Text;
public class WSIMUtilities
{
public static string SHA2(string input)
{
SHA256Managed crypt = new SHA256Managed();
byte[] crypto = crypt.ComputeHash(Encoding.ASCII.GetBytes(input), 0, Encoding.ASCII.GetByteCount(input));
string encoded = "";
foreach (byte b in crypto) { encoded += (char)b; }
return encoded;
}
private static Random rnd = new Random();
public static long GetValidID()
{
return DateTime.Now.Ticks + rnd.Next(999);
}
}