C++
xin~777
帅哥一枚
展开
-
C++使用openssl建立证书,进行签名,验签,加密,解密(基于RSA)
话不多说,步骤详细,总结坑点巨坑 RSA_verify()验证签名总是无法成功官网的介绍int RSA_verify(int type, const unsigned char *m, unsigned int m_len, unsigned char *sigbuf, unsigned int siglen, RSA *rsa);/*RSA_verify() verifies th...原创 2019-12-02 16:14:59 · 6057 阅读 · 3 评论 -
C++排坑笔记(优化)
vector的capacity(容量)问题:vector一般会默认配置2k的内存容量,而当使用的内存超过配置的内存时,就会引起再分配,非常耗时,因此需要使用vector.reserve()提前分配大于使用空间的内存。string的切片(获取子串)问题:string.substr(start,num)string的字符串相加问题:右边至少有一个字符串甚至无法使用+=来避免该问题strin...原创 2019-09-19 20:44:57 · 154 阅读 · 0 评论