PasswordDeriveBytes(.net 2.0) for iPhone

柔情痞子 提交于 2020-01-01 17:14:30

问题


I want to use PasswordDeriveBytes(RSA PBKDF1) of .NET 2.0 within iPhone. How could i achieve the same exact implementation? Are there any methods or libraries for it? I especially want it for using a salt.

Thanks


回答1:


Since MS implementation is not totally following the PKCS#5 specification the easiest way would be to convert Mono (C#) source code into Objective C. That will get you very close to MS implementation (everything except a very bad bug :-). In any case I suggest you stick to the specification (don't get more bytes that what it's designed to provide).

https://raw.github.com/mono/mono/master/mcs/class/corlib/System.Security.Cryptography/PasswordDeriveBytes.cs



来源:https://stackoverflow.com/questions/18458425/encryption-between-net-and-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!