Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Security.Cryptography;
- using System.Text;
- namespace MyCloud.Helpers
- {
- public static class HashPasswordHelper
- {
- public static string HashPassowrd(string password)
- {
- using (var sha256 = SHA256.Create())
- {
- var hashedBytes = sha256.ComputeHash(Encoding.UTF8.GetBytes(password));
- var hash = BitConverter.ToString(hashedBytes).Replace("-", "").ToLower();
- return hash;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement