热门标签
更多>
搜索结果
查询Tags标签: hnd,共有 2条记录-
使用 openssl 计算 base64(防止内存泄露)
#include "openssl/bio.h" #include "openssl/evp.h" #include "openssl/buffer.h"int base64(const unsigned char *src, int src_len, unsigned char *dst, int *dst_len) {BIO *bio_hnd_mem = NULL;BIO *bio_hnd_meth = NULL;BUF_MEM *…
2021/6/2 7:26:02 人评论 次浏览 -
libcurl第十四课: 获取返回报文的头部信息
场景 需要获取HTTP报头提取Cookie信息,发送给服务器,否则返回302重定向错误static size_t Writeresponse(void *ptr, size_t size, size_t nmemb, void *userData) { string* pBuffer = (string*)userData; size_t length = size * nmemb; pBuffer->append((c…
2021/6/1 10:24:03 人评论 次浏览