00001 using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004 using System.Security.Cryptography;
00005
00006 namespace Shared
00007 {
00011 public class Utils
00012 {
00018 public static string HashedValue(string password)
00019 {
00020 if (password.Length < 1)
00021 return "";
00022 MD5 md = MD5.Create();
00023 byte[] bs = System.Text.Encoding.UTF8.GetBytes(password);
00024 bs = md.ComputeHash(bs);
00025 System.Text.StringBuilder s = new System.Text.StringBuilder();
00026 foreach (byte b in bs)
00027 {
00028 s.Append(b.ToString("x2").ToLower());
00029 }
00030
00031 return s.ToString();
00032 }
00033 }
00034 }