zoukankan      html  css  js  c++  java
  • 分组加密与模式

     

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

    但是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)

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

  • 相关阅读:
    继承
    成员变量,局部变量,静态变量
    几种常用排序
    jdk环境配置以及java执行过程
    基础语法
    数据类型
    关键字和标识符
    网络编程(二)-socket套接字
    反射
    多态
  • 原文地址:https://www.cnblogs.com/feng9exe/p/8075885.html
Copyright © 2011-2022 走看看