ios - 在 IOS 上使用加密消息语法服务创建 PKCS7/CMS
问题描述
我需要创建一个 PKCS7/CMS 以在 Swift 中输入 Web 服务。
在 Android 中,我们使用了 'spongycastle' https://www.bouncycastle.org/docs/pkixdocs1.4/org/bouncycastle/cms/CMSSignedData.html但找不到 Swift 或 Objective C 的示例或解决方案。
搜索了 Apple 的文档:https ://developer.apple.com/documentation/security/cryptographic_message_syntax_services#1677736但找不到任何特殊的本地或第三方支持。
问了苹果技术支持,他们说IOS还不支持:https ://developer.apple.com/forums/thread/681717
根据Apple文档,应该使用以下函数,但是类和函数的内容应该是什么,如何使用它们来实现PKCS7/CMS Signature?
func CMSEncoderCreate(_ cmsEncoderOut: UnsafeMutablePointer<CMSEncoder?>) -> OSStatus {
return
}
func CMSEncoderUpdateContent(_ cmsEncoder: CMSEncoder,
_ content: UnsafeRawPointer,
_ contentLen: Int) -> OSStatus {
return
}
func CMSEncoderCopyEncodedContent(_ cmsEncoder: CMSEncoder,
_ encodedContentOut: UnsafeMutablePointer<CFData?>) -> OSStatus {
return
}
有没有人有使用 Swift 或目标 C 代码的特定解决方案来执行此操作的经验?
解决方案
推荐阅读
- reactjs - 删除某些路线反应的侧边栏
- xamarin - Zebra TC26 扫描仪在代码中更改配置时不扫描 - Xamarin
- flutter - 图像未显示在资产中
- php - 未设置不同域 API 发送的 Cookie
- spring - spring oauth2 资源服务器:禁用 ssl 验证
- java - 如何理解“新”Java 飞行记录器 ObjectAllocationSample 事件?
- python - python 中关于依赖关系的表格错误(colab 和本地)
- windows - 从 Windows 机器 SSH 到 Kubernetes 主节点
- webpack - 错误:找不到模块“webpack/lib/NamedModulesPlugin”
- jquery - 如何在jQuery中向下滑动按钮