openssl aes 加密算法 api使用

示例 使用 AES-128-CBC加密算法

使用了pkcs5_encode padding 方式 pkcs7_encode也是兼容的


#include 
#include 
#include 
#include 
#include 

// a simple hex-print routine. could be modified to print 16 bytes-per-line
static void hex_print(const void* pv, size_t len)
{
    const unsigned char * p = (const unsigned char*)pv;
    if (NULL == pv)
        printf("NULL");
    else
    {
        size_t i = 0;
        for (; i

你可能感兴趣的:(openssl aes 加密算法 api使用)