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

  • 相关阅读:
    mysql 需要掌握的重点
    Java基础知识之常见关键字以及概念总结
    abstract类中method
    java异常继承何类,运行时异常与一般异常的区别
    Java关键字final、static使用总结
    JAVA读取XML文件
    关于ApplicationContext的初始化
    web.xml配置详解
    maven javaProject打包发布成服务
    Spring Boot Actuator 配置和应用
  • 原文地址:https://www.cnblogs.com/feng9exe/p/8075707.html
Copyright © 2011-2022 走看看