CommonCrypto 不再是 iPhone SDK 的一部分 - 我还能在哪里轻松获得 MD5 函数?
正如你们中的许多人可能已经知道的那样,CommonCrypto 不再包含在 iPhone SDK 中(与 3.0 一样)。
还有哪里可以轻松获得 MD5 函数?我是否必须将 OpenSSL 编译到我的项目中才能获得 MD5?
一些说明:
- 这不是为了安全,
- 这将与需要字符串 MD5 摘要的 API 一起使用。我无法控制这个 API。
如果我可以使用 SHA256,我会的。我完全赞成继续前进,但我无法更改 API。
编辑
看来我错了。 CommonCrypto 仍然在 iPhone SDK 中,只是不像以前那么明确。我正在寻找要包含在我的项目中的 libCrypto 库。我不知道您可以包含 CommonCrypto 标头而不链接到库......
So as many of you may already know, CommonCrypto isn't included in the iPhone SDK anymore (as on 3.0).
Where else can I easily get hold of an MD5 function? Am I going to have to compile OpenSSL into my project just to get MD5??
A few clarifications:
- This isn't for security
- This is going to be used with an API that requires an MD5 digest of a string. I have no control over this API.
If I could use SHA256, I would. I'm all for moving forward, but I can't change the API.
Edit
It seems I was mistaken. CommonCrypto is still in the iPhone SDK, just not explicity as it used to be. I was looking for the libCrypto library to include in my project. I was unaware that you could include the CommonCrypto headers without linking against the library...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你确定它不包括在内吗?我使用以下有效代码在设备上编译了 3.0 版本的应用程序:
Are you sure its not included? I have apps compiled on the device for 3.0 using the following code that works: