⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 x509cmsmemoryfuncs.c

📁 vc环境下的pgp源码
💻 C
字号:
#include "x509CMS.h"

#include "pgpMemoryMgr.h"

PKIMemoryMgr X509CMSMemoryMgr = {
    NULL,
    x509CMSAllocProc,
    x509CMSReallocProc,
    x509CMSDeallocProc
};

void *
x509CMSAllocProc (
        PKIMemoryMgr    *mem,
        size_t          requestSize
)
{
    return (PGPNewData ((PGPMemoryMgrRef) mem->customValue, requestSize, 0)); 
}

int
x509CMSDeallocProc (
        PKIMemoryMgr    *mem,
        void            *allocation
)
{
	(void) mem;
	
    PGPFreeData (allocation);
    return 0;
}

int
x509CMSReallocProc (
	PKIMemoryMgr	*mem,
	void		**allocation,
	size_t		requestSize)
{
    PGPReallocData ((PGPMemoryMgrRef) mem->customValue, allocation, requestSize, 0);
    return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -