using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Security.Cryptography;
using System.Text;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Write(StrToByteArray("Hi"));
}
public void HashData(HashAlgorithm hashAlg, string str)
{
byte[] rawBytes = ASCIIEncoding.ASCII.GetBytes(str);
byte[] hashData = hashAlg.ComputeHash(rawBytes);
}
public byte[] StrToByteArray(string str)
{
ASCIIEncoding encoding = new ASCIIEncoding();
SHA512 sha = new SHA512Managed();
return encoding.GetBytes(str);
}
}