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 string EncryptMD5(string value)
        {
            MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
            byte[] byteValue = System.Text.Encoding.UTF8.GetBytes(value);
            byte[] byteHash = md5.ComputeHash(byteValue);
            return Convert.ToBase64String(byteHash);
        }
    }
}