分组加密与模式

 

理论上分组加密支持任何模式;

但是iOS系统只支持CBC模式。

CommonCryptor.h

Initialization vector, optional. Used by 

                            block ciphers when Cipher Block Chaining (CBC) 

                            mode is enabled. If present, must be the same

                            length as the selected algorithm's block size. 

                            If CBC mode is selected (by the absence of the 

                            kCCOptionECBMode bit in the options flags) and no 

                            IV is present, a NULL (all zeroes) IV will be used. 

                            This parameter is ignored if ECB mode is used or

                            if a stream cipher algorithm is selected. For sound 

                            encryption, always initialize iv with random data.

2)CBC(Cipher Block Chaining)

算法本身包含:算法本身+分组级连模式

原文地址:https://www.cnblogs.com/feng9exe/p/8075885.html