zoukankan      html  css  js  c++  java
  • iOS 加密算法汇总

    CCCryptorStatus CCCryptorCreate(

        CCOperation op,             /* kCCEncrypt, etc. */

        CCAlgorithm alg,            /* kCCAlgorithmDES, etc. */

        CCOptions options,          /* kCCOptionPKCS7Padding, etc. */

        const void *key,            /* raw key material */

        size_t keyLength,   

        const void *iv,             /* optional initialization vector */

        CCCryptorRef *cryptorRef)  /* RETURNED */

    enum {

        kCCEncrypt = 0, 

        kCCDecrypt,     

    };

    typedef uint32_t CCOperation;

    enum {

        /* options for block ciphers */

        kCCOptionPKCS7Padding   = 0x0001,

        kCCOptionECBMode        = 0x0002

        /* stream ciphers currently have no options */

    };

    typedef uint32_t CCOptions;

    enum {

        kCCAlgorithmAES128 = 0,

        kCCAlgorithmAES = 0,

        kCCAlgorithmDES,

        kCCAlgorithm3DES,       

        kCCAlgorithmCAST,       

        kCCAlgorithmRC4,

        kCCAlgorithmRC2,   

        kCCAlgorithmBlowfish    

    };

    typedef uint32_t CCAlgorithm;

    OSStatus SecKeyEncrypt(

                           SecKeyRef           key,

                           SecPadding          padding,

                           const uint8_t *plainText,

                           size_t              plainTextLen,

                           uint8_t             *cipherText,

                           size_t              *cipherTextLen)

    __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_2_0);

  • 相关阅读:
    Goldbach's Conjecture
    查找素数
    最大公约数和最小公倍数
    迭代求立方根
    计算两个矩阵的乘积
    随机选择算法
    有几个PAT
    python3学习笔记之安装
    Ubuntu 16.04卸载一些不必要的预装软件
    Xshell连接不上虚拟机提示ssh服务器拒绝了密码,请再试一次
  • 原文地址:https://www.cnblogs.com/feng9exe/p/8075707.html
Copyright © 2011-2022 走看看