C# RijndaelEnhanced 使用 php mcrypt 解密
我有一个 C# .net 应用程序,已反编译。该应用程序用于登录密码加密: http://www.obviex.com/samples/Sample.aspx?Source=EncryptionWithSaltCS&Title=Encryption%20With%20Salt&Lang=C%23
C# 代码
rijndaelKey = new Krypto.RijndaelEnhanced(passPhrase, initVector);
PlainPassword = DiverseVariablen.rijndaelKey.Decrypt(Conversions.ToString(row["ProjectKennwort"])))
我已经通过和 iv 。
我怎样才能解密php中的密码? 我尝试了 mcrypt_decrypt() 的所有变体。
有人有主意吗?
友好的问候和衷心的感谢。
i have a C# .net app with i decompiled. Tis app uses for login password cryption:
http://www.obviex.com/samples/Sample.aspx?Source=EncryptionWithSaltCS&Title=Encryption%20With%20Salt&Lang=C%23
C# Code
rijndaelKey = new Krypto.RijndaelEnhanced(passPhrase, initVector);
PlainPassword = DiverseVariablen.rijndaelKey.Decrypt(Conversions.ToString(row["ProjectKennwort"])))
I have pass and iv.
How can i decrypt the passwords in php?
I tryted allready several variants of mcrypt_decrypt().
Didt somene have a idea?
Friendly regards and big thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来他们正在使用基于密码的密钥派生函数。 mycrypt 可以让您直接设置密钥,并在适当的情况下用空填充它。您链接到的 C# 库从密钥派生密码。 Google 搜索 PBKDF2 PHP 显示以下内容:
http://www.itnewb.com/v/Encrypting-Passwords-with-PHP-for-Storage-Using-the-RSA-PBKDF2-Standard
所以我会尝试一下。另外,我个人建议使用 phpseclib,一个纯 PHP AES 实现,以实现可移植性。 PHP 安装在服务器上并不意味着 mcrypt 也安装在服务器上。
It looks like they're using a password-based key derivation function. mycrypt gives you set the key directly and null pads it if appropriate. The C# library you've linked to derives a password from the key. A Google search for PBKDF2 PHP reveals the following:
http://www.itnewb.com/v/Encrypting-Passwords-with-PHP-for-Storage-Using-the-RSA-PBKDF2-Standard
So I'd try that. Also, I'd, personally, recommend using phpseclib, a pure PHP AES implementation, for portability. That PHP is installed on a server doesn't mean that mcrypt is.