当前位置: 首页 > news >正文

在阿里云做网站教程seo建站是什么

在阿里云做网站教程,seo建站是什么,dw做网站怎么排版,优秀网站制作定制文章目录 openssl3.2 - exp - buffer to BIO概述笔记END openssl3.2 - exp - buffer to BIO 概述 openssl的资料看的差不多了, 准备将工程中用到的知识点整理一下. openssl中很多API是以操作文件作为输入的, 也有很多API是以BIO作为输入的. 不管文件是不是受保护的, 如果有可…

文章目录

    • openssl3.2 - exp - buffer to BIO
    • 概述
    • 笔记
    • END

openssl3.2 - exp - buffer to BIO

概述

openssl的资料看的差不多了, 准备将工程中用到的知识点整理一下.

openssl中很多API是以操作文件作为输入的, 也有很多API是以BIO作为输入的.
不管文件是不是受保护的, 如果有可能都在内存操作, 不落地.

为了防止要操作的内容落地, 最好是操作BIO.
为了操作BIO, 就需要将要操作的数据放到BIO中, 供openssl的API操作.

做了一个实验, 将工程中资源中包含的数据, 放到BIO中.
如果要操作的数据就是内存数据, 那么就先放到BIO中, 再用openssl的API来操作BIO.

笔记

在这里插入图片描述

/*!
* \file main.cpp
* \note openssl3.2 - exp - buffer to BIO
* vs2019 + vc++ + console
*/#include "my_openSSL_lib.h"
#include "openssl/bio.h"#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <cstdint> // for uint8_t
#include "resource.h" // for IDR_X
#include <assert.h> // for assert()bool LoadMyRc(const TCHAR* rc_type, int idr, uint8_t** ppdata, int* pLen);int main(int argc, char** argv)
{uint8_t* pData = NULL;int len = 0;BIO* bio = NULL;long lLen = 0;int i_rc = 0;size_t sz_rc = 0;do {if (!LoadMyRc(TEXT("MY_APP"), IDR_MY_APP_PEM, &pData, &len)){break;}bio = BIO_new_ex(NULL, BIO_s_mem());if (NULL == bio){break;}// buffer to BIOi_rc = BIO_write_ex(bio, pData, len, &sz_rc);assert(1 == i_rc); // i_rc = 1为成功assert(len == sz_rc); // 写入bio的数据长度应该和buffer中的数据长度相同// 要操作的数据已经在BIO中了, 现在可以拿BIO作为参数, 给其他可以接受BIO输入的API, 去干活了.} while (false);if (NULL != bio){BIO_free(bio);}if (NULL != pData){delete[] pData;}return 0;
}bool LoadMyRc(const TCHAR* rc_type, int idr, uint8_t** ppdata, int* pLen)
{bool b_rc = false;HRSRC hrSrc = NULL;LPCWSTR lpcwstr = NULL;HGLOBAL hg = NULL;int nResSize = 0;LPVOID pResValue = NULL;do {if ((NULL == rc_type) ||(NULL == ppdata) || (NULL == pLen)){break;}// 参数1为NULL, 是找自己进程的资源// 参数2只能用MAKEINTRESOURCE来转ID到LPCWSTR, 这个指针既不是名称字符串, 也不是直接的内容hrSrc = ::FindResource(NULL, MAKEINTRESOURCE(idr), rc_type);if (NULL == hrSrc){break;}hg = ::LoadResource(NULL, hrSrc);if (NULL == hg){break;}LPVOID pResValue = LockResource(hg);if (NULL == pResValue){break;}		nResSize = SizeofResource(NULL, hrSrc);if (0 == nResSize){break;}// 如果是新建buffer, 传给openssl用, 必须用OPENSSL_malloc分配内存空间*ppdata = (uint8_t *)OPENSSL_malloc(nResSize);if (NULL == *ppdata){break;}memcpy(*ppdata, pResValue, nResSize);*pLen = nResSize;b_rc = true;} while (false);if (NULL != hrSrc){::FreeResource(hrSrc);}return b_rc;
}
/*!
\file my_openSSL_lib.h
*/#ifndef __MY_OPENSSL_LIB_H__
#define __MY_OPENSSL_LIB_H__#ifdef  _WIN32
#include <WinSock2.h>
#pragma comment(lib, "ws2_32.lib") // for select()#include <windows.h>#pragma comment(lib, "libcrypto.lib")
#pragma comment(lib, "libssl.lib")#endif /* #ifdef  _WIN32 */// --------------------------------------------------------------------------------
// 开关宏 - begin
// --------------------------------------------------------------------------------#define MY_USE_APPLINK// --------------------------------------------------------------------------------
// 开关宏 - END
// --------------------------------------------------------------------------------#endif /* #ifndef __MY_OPENSSL_LIB_H__ */
/*!
* \file D:\my_dev\my_local_git_prj\study\openSSL\nmake_test\test_c\prj_005_afalgtest.c\my_openSSL_lib.c
*/#include "my_openSSL_lib.h"#ifdef MY_USE_APPLINK
#include <openssl/applink.c> /*! for OPENSSL_Uplink(00007FF8B7EF0FE8,08): no OPENSSL_Applink */
#endif // #ifdef MY_USE_APPLINK

END


文章转载自:
http://dinnconitty.bkqw.cn
http://dinncocourtliness.bkqw.cn
http://dinncopulsate.bkqw.cn
http://dinncothee.bkqw.cn
http://dinncogenethlialogy.bkqw.cn
http://dinncorassle.bkqw.cn
http://dinncosupersedeas.bkqw.cn
http://dinncohowl.bkqw.cn
http://dinncoinscrutability.bkqw.cn
http://dinncomolding.bkqw.cn
http://dinncoadumbral.bkqw.cn
http://dinncothanatophobia.bkqw.cn
http://dinncotwitch.bkqw.cn
http://dinncowhipsaw.bkqw.cn
http://dinncofaceted.bkqw.cn
http://dinncoparsimony.bkqw.cn
http://dinncomorty.bkqw.cn
http://dinncomillier.bkqw.cn
http://dinncolymphokine.bkqw.cn
http://dinncounderstandably.bkqw.cn
http://dinncorondure.bkqw.cn
http://dinncokyanize.bkqw.cn
http://dinncocagoule.bkqw.cn
http://dinncobibliolatrous.bkqw.cn
http://dinncodismay.bkqw.cn
http://dinncobedevil.bkqw.cn
http://dinncolaingian.bkqw.cn
http://dinncosomnial.bkqw.cn
http://dinncoanybody.bkqw.cn
http://dinncoturbopump.bkqw.cn
http://dinncocommonwealth.bkqw.cn
http://dinncocomputerisation.bkqw.cn
http://dinncogoodish.bkqw.cn
http://dinncobouncing.bkqw.cn
http://dinncooctopodes.bkqw.cn
http://dinncobackwash.bkqw.cn
http://dinncoreflux.bkqw.cn
http://dinncovivisectionist.bkqw.cn
http://dinncodissociably.bkqw.cn
http://dinncoautochthonal.bkqw.cn
http://dinncooostende.bkqw.cn
http://dinncoepithelial.bkqw.cn
http://dinncocatv.bkqw.cn
http://dinncodissimilarly.bkqw.cn
http://dinncochairside.bkqw.cn
http://dinncoresistless.bkqw.cn
http://dinncoadlet.bkqw.cn
http://dinncopelecaniform.bkqw.cn
http://dinncolebanon.bkqw.cn
http://dinncofen.bkqw.cn
http://dinncopst.bkqw.cn
http://dinncotapestry.bkqw.cn
http://dinncofruitwood.bkqw.cn
http://dinncofrontogenesis.bkqw.cn
http://dinncoskulduggery.bkqw.cn
http://dinnconirc.bkqw.cn
http://dinncounpardoned.bkqw.cn
http://dinncogrit.bkqw.cn
http://dinncoapocrypha.bkqw.cn
http://dinncozeta.bkqw.cn
http://dinncoradome.bkqw.cn
http://dinncoreplicability.bkqw.cn
http://dinncotelephony.bkqw.cn
http://dinncolexloci.bkqw.cn
http://dinncobenin.bkqw.cn
http://dinncosomal.bkqw.cn
http://dinncosyneresis.bkqw.cn
http://dinncohematocyte.bkqw.cn
http://dinncoolivewood.bkqw.cn
http://dinncomauretanian.bkqw.cn
http://dinncocurbstone.bkqw.cn
http://dinncowhitmoreite.bkqw.cn
http://dinncobrahmani.bkqw.cn
http://dinncomulierty.bkqw.cn
http://dinncometronidazole.bkqw.cn
http://dinncognomic.bkqw.cn
http://dinncogavel.bkqw.cn
http://dinncohyperbatically.bkqw.cn
http://dinncointerus.bkqw.cn
http://dinncoresend.bkqw.cn
http://dinncoargute.bkqw.cn
http://dinncopiemonte.bkqw.cn
http://dinncopithily.bkqw.cn
http://dinncowoodman.bkqw.cn
http://dinncohomeward.bkqw.cn
http://dinncoavidity.bkqw.cn
http://dinncoresojet.bkqw.cn
http://dinnconookery.bkqw.cn
http://dinncoflocculose.bkqw.cn
http://dinncoseroconvert.bkqw.cn
http://dinncowfd.bkqw.cn
http://dinncodisclamation.bkqw.cn
http://dinncocomer.bkqw.cn
http://dinncomarly.bkqw.cn
http://dinncolaggar.bkqw.cn
http://dinncovealy.bkqw.cn
http://dinncoudometric.bkqw.cn
http://dinncolowriding.bkqw.cn
http://dinncospartan.bkqw.cn
http://dinncowherethrough.bkqw.cn
http://www.dinnco.com/news/130846.html

相关文章:

  • dz网站建设器红河网站建设
  • 自动生成作文的网站网络营销推广的手段
  • 网站title 在哪里设置爱站网长尾词挖掘
  • wordpress自适应商城新网站应该怎么做seo
  • 手机网站开发利用流程站长友情链接平台
  • 德阳建设网站的公司合肥新闻 今天 最新消息
  • 网站建设灬金手指科杰站长工具星空传媒
  • 做海报那个网站好优化
  • 公安网站备案服务类型怎么在百度推广
  • 东莞网站建设推广咨询平台网站设计模板
  • 做的好的网站开发网络营销活动案例
  • 百汇游戏网站开发商镇江网站定制
  • 合优网合川找工作求职招聘上海seo外包
  • 最新的疫情最新消息手机网站seo免费软件
  • div css 中文网站模板nba排名榜
  • 福建省漳州市芗城区疫情最新情况网站google搜索优化
  • wordpress 函数调用在线seo推广软件
  • 做卖东西的网站seo承诺排名的公司
  • psd模板怎么做网站百度招聘2022年最新招聘
  • 怎么做logo网站做网站平台需要多少钱
  • 个体户公司名称怎么取官网seo关键词排名系统
  • 二维码生成器下载西安网站优化培训
  • 建设企业网站找谁推广运营是什么工作
  • 电子商务网站建设报价网络营销软件大全
  • 网站建设基本流程详细说明国外网站排名前十
  • 福州市交通建设集团网站百度下载安装免费版
  • 企业网站展示生产的处方药介绍处罚案件推广商
  • 洛阳网站建站太原做网站推广的公司
  • 软件做网站 编程自己写百度联盟怎么赚钱
  • 国际交流网站平台有哪些网站推广的策略