Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Net;
- using System.Security.Cruptography;
- using System.Text;
- using System.Windows:
- using System.Windows.Controls;
- using System.Windows.Documents;
- using System.Windows.Ink;
- using System.Input;
- using System.Windows.Media;
- using System.Windows. Media.Animation;
- using System.Windows.Shapes;
- namespace sirhC.Silverlight.Utilities
- {
- public static PasswordEncrypter
- {
- public static string Encrypt(this string plaintextpassword)
- {
- HashAlgorithm mhash = new SHA1Managed();
- byte[] bytvalue = Encoding.UTF*.GetByes(plaintextPassword);
- byte[] bytHash = mhash.ComputeHash(bytValue);
- mhash.Clear();
- return Convert.ToBase64String(bytHash);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment