Tag: 密码加密

如何在C#/ Bouncy Castle中创建PBKDF2-SHA256密码哈希

我需要创建一个PBKDF2-SHA256密码哈希,但是遇到了一些麻烦。 我下载了Bouncy Castle的回购,但是在unit testing中找到了我想要的东西。 在这里找到了一些示例代码,但这只是SHA1。 代码的关键位是: /// /// Computes the PBKDF2-SHA1 hash of a password. /// /// The password to hash. /// The salt. /// The PBKDF2 iteration count. /// The length of the hash to generate, in bytes. /// A hash of the password. private static byte[] PBKDF2(string password, byte[] salt, int iterations, int […]

ColdFusion – cfusion_encrypt()和cfusion_decrypt() – C#替代方案

我有一个数据库,其中包含通过cfusion_encrypt()加密的用户密码。 我需要在C#中为ColdFusion代码做一个登录替代。 有没有简单的方法如何在C#中模拟这个,这样我就可以比较用户密码的加密值并将它们与ColdFusion值匹配?