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

  • 相关阅读:
    Android5.0录屏方案
    Android点阵屏效果的控件
    Android绘制View相关的几个问题
    AndroidStudio导入第三方开源库
    第六百二十三天 how can I坚持
    第六百二十二天 how can I 坚持
    第六百二十一天 how can I 坚持
    第六百二十天 how can I 坚持
    第六百一十九天 how can I 坚持
    第六百一十八天 how can I 坚持
  • 原文地址:https://www.cnblogs.com/feng9exe/p/8075707.html
Copyright © 2011-2022 走看看