?? certificat.cpp
字號:
// Certificat.cpp: implementation of the CCertificat class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "CertInstall.h"
#include "Certificat.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CCertificat::CCertificat()
{
m_strContainerName = NULL;
m_ucValueCert = NULL;
m_ulValueCertLen = 0;
}
CCertificat::~CCertificat()
{
/*if (m_strContainerName){ free((char*)m_strContainerName); m_strContainerName = NULL;}
if (m_ucValueCert) { free((unsigned char*)m_ucValueCert); m_ucValueCert = NULL;}
if (m_strLabel) { free((char*)m_strLabel); m_strLabel = NULL;}
m_ulValueCertLen = 0;*/
}
void CCertificat::setContName(char * strContainerName)
{
m_strContainerName = (char*)malloc (sizeof(char)*strlen(strContainerName)+1);
strcpy(m_strContainerName, strContainerName);
}
void CCertificat::setValueCert(unsigned char * ucValueCert, int ulValueCertLen)
{
m_ulValueCertLen = ulValueCertLen;
m_ucValueCert = (unsigned char*)malloc(sizeof(unsigned char*)*m_ulValueCertLen);
memcpy(m_ucValueCert, ucValueCert, m_ulValueCertLen);
}
void CCertificat::setLabel(char * strLabel)
{
m_strLabel = (char*)malloc (sizeof(char)*strlen(strLabel)+1);
strcpy(m_strLabel, strLabel);
}
char * CCertificat::getContName()
{
return m_strContainerName;
}
unsigned char * CCertificat::getValueCert()
{
return m_ucValueCert;
}
unsigned long CCertificat::getValueCertLen()
{
return m_ulValueCertLen;
}
char * CCertificat::getLabel()
{
return m_strLabel;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -