Security C#

//-----------------------------------------------------------------------
// 
//     Copyright (c) Pyramid Consulting. All rights reserved.
//  khoa.tran - 15-Dec-2007
// 
//-----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;
namespace Bamboo.Core.Common.Crypto
{
    public class CryptoUtil
    {
        public static byte[] EncryptSHA256(string text)
        {
            SHA256 sha256 = SHA256.Create();
            UTF8Encoding encoding = new UTF8Encoding();
            return sha256.ComputeHash(encoding.GetBytes(text));
        }
    }
}