iOS CommonCrypto参考

iOS CommonCrypto参考,第1张

概述我试图为Apple的CommonCrypto库找到某种参考,因为显然Apple没有任何明显的链接,谷歌给出的那些已经过时了,如下所示: https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man3/Common%20Crypto.3cc.html 有什么暗示吗?是否有更好的库可用于开发 我试图为Apple的CommonCrypto库找到某种参考,因为显然Apple没有任何明显的链接,谷歌给出的那些已经过时了,如下所示:

https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man3/Common%20Crypto.3cc.html

有什么暗示吗?是否有更好的库可用于开发具有大量加密功能的应用程序?

谢谢.

解决方法 它们提供的大多数信息都在头文件的开始行中.按住Command键盘按钮,然后单击CommonCrypto / CommonCryptor.h进行访问.
/*!@header     CommonCryptor.h@abstract   Generic interface for symmetric encryption. @discussion This interface provIDes access to a number of symmetric             encryption algorithms. Symmetric encryption algorithms come             in two "flavors" -  block ciphers,and stream ciphers. Block            ciphers process data (while both encrypting and decrypting)             in discrete chunks of  data called blocks; stream ciphers             operate on arbitrary sized data.             The object declared in this interface,CCCryptor,provIDes            access to both block ciphers and stream ciphers with the same            API; however some options are available for block ciphers that            do not apply to stream ciphers.             The general operation of a CCCryptor is: initialize it            with raw key data and other optional fIElds with            CCCryptorCreate(); process input data via one or more calls to            CCCryptorUpdate(),each of which may result in output data            being written to caller-supplIEd memory; and obtain possible            remaining output data with CCCryptorFinal(). The CCCryptor is            disposed of via CCCryptorRelease(),or it can be reused (with            the same key data as provIDed to CCCryptorCreate()) by calling            CCCryptorreset().             CCCryptors can be dynamically allocated by this module,or             their memory can be allocated by the caller. See discussion for            CCCryptorCreate() and CCCryptorCreateFromData() for information             on CCCryptor allocation.            One option for block ciphers is padding,as defined in PKCS7;            when padding is enabled,the total amount of data encrypted            does not have to be an even multiple of the block size,and             the actual length of plaintext is calculated during decryption.             Another option for block ciphers is Cipher Block Chaining,kNown            as CBC mode. When using CBC mode,an Initialization Vector (IV)            is provIDed along with the key when starting an encrypt            or decrypt operation. If CBC mode is selected and no IV is             provIDed,an IV of all zeroes will be used.             CCCryptor also implements block bufferring,so that indivIDual            calls to CCCryptorUpdate() do not have to provIDe data whose            length is aligned to the block size. (If padding is Disabled,encrypting with block ciphers does require that the *total*            length of data input to CCCryptorUpdate() call(s) be aligned            to the block size.)            A given CCCryptor can only be used by one thread at a time;            multiple threads can use safely different CCCryptors at the            same time.              */
总结

以上是内存溢出为你收集整理的iOS CommonCrypto参考全部内容,希望文章能够帮你解决iOS CommonCrypto参考所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1107524.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-28
下一篇 2022-05-28

发表评论

登录后才能评论

评论列表(0条)

保存