/// <summary> /// Gets SHA1 hash of a string /// </summary> /// <param name="str">String</param> /// <returns>SHA1 hash as string</returns> public static string SHA1(string str) { #if SILVERLIGHT byte[] bytes = Encoding.UTF8.GetBytes(str); #else byte[] bytes = ASCIIEncoding.Default.GetBytes(str); #endif return(ByteUtility.SHA1(bytes)); }
/// <summary> /// Gets SHA1 hash of a string /// </summary> /// <param name="str">String</param> /// <returns>SHA1 hash as string</returns> public static string SHA1(string str) { byte[] bytes = ASCIIEncoding.Default.GetBytes(str); return(ByteUtility.SHA1(bytes)); }