openssl
lanzhihui_
!
展开
-
openssl编程-算法整合
#include <stdio.h>#include <stdlib.h>#include <getopt.h>#include <string.h>#include <fcntl.h>#include <unistd.h>#include <openssl/evp.h>static void print_help(void){ printf("COMPILE\n"); printf(" gcc.原创 2022-03-05 22:46:33 · 1249 阅读 · 0 评论 -
openssl编程-aead
openssl aead算法接口使用示例://gcc -g -lssl aead_test.c -lcrypto -L /usr/local/lib/#include <string.h>#include <openssl/evp.h>#define IV_SIZE 8#define KEY_SIZE 24#define INPUT_SIZE 100void print_hexdata(unsigned char *b, int len, char *title原创 2021-07-25 14:07:24 · 1067 阅读 · 0 评论 -
openssl编程-cipher
openssl cipher算法接口使用示例://gcc -g -lssl cipher_test.c -lcrypto -L /usr/local/lib/#include <string.h>#include <openssl/evp.h>#define IV_SIZE 8#define KEY_SIZE 24#define INPUT_SIZE 100void print_hexdata(unsigned char *b, int len, char *t原创 2021-07-24 23:46:07 · 430 阅读 · 0 评论 -
openssl编程-DH
openssl DH算法接口使用示例://gcc -g -lssl dh_test.c -lcrypto -L /usr/local/lib/#include<openssl/dh.h>#include<memory.h>void print_bigdata(const BIGNUM *b, char *title) { unsigned char a[2048] = {0}; int len = BN_bn2bin(b, a); int i = 0, c = 0原创 2021-07-18 00:09:43 · 1866 阅读 · 0 评论