Encrypt SHA1
//----------------------------------------------------------------------- // <copyright file="CryptoUtil.cs" company="Pyramid Consulting"> // Copyright (c) Pyramid Consulting. All rights reserved. // khoa.tran - 15-Dec-2007 // </copyright> //----------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Text; using System.Security.Cryptography; namespace Bamboo.Core.Common.Crypto { public class CryptoUtil { public static byte[] EncryptSHA1(string text) { SHA1 sha1 = SHA1.Create(); UTF8Encoding encoding = new UTF8Encoding(); return sha1.ComputeHash(encoding.GetBytes(text)); } } }