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);

  • 相关阅读:
    路由配置系统(views)
    Django-MTV简介
    web框架
    APScheduler
    python单例模式
    mysql_istall_db
    mysql多线程写入出现脏数据(重复数据)问题?
    南方周末 【1999年新年献词】总有一种力量让我们泪流满面
    卡特兰树通向证明
    可持久化线段树(主席树)快速简洁教程 图文并茂 保证学会。kth number例题
  • 原文地址:https://www.cnblogs.com/feng9exe/p/8075707.html
Copyright © 2011-2022 走看看