This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Security.Cryptography; | |
using System.Text; | |
namespace Demo | |
{ | |
/// <summary> | |
/// 密码加密帮助类 | |
/// 使用特定算法(SHA256或SHA512和盐值对密码进行加密) | |
/// 将密码以{hash,salt,algorithm}的形式储存以避免明文储存机密带来的安全风险 |