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

📄 sdfunc.h

📁 基于ppc的PKI_SD的一个小模块
💻 H
字号:
#pragma once

class SDFunc
{
public:
	SDFunc(void);
public:
	~SDFunc(void);
public:
	static char AscToChar( char ch1 );
	static void TrimSpace( CString &m_strTxt );
	static void CStringToHex( CString m_strTxt, unsigned char * hexCode, int &len );
public:
	// 签名口令校验
	static unsigned short AuthPIN(CString sPIN);
public:
	//获取动态口令“事件同步方式”动态口令的生成
	static unsigned short GenOTP(int nOTPlen,CString &strData);
public:
	static unsigned short GenerateKeys(CString &sResult);
public:
	static CString GetSDErrMsg(unsigned short int errNumber);
public:
	static unsigned short SDFunc::TDESEncrypt(CString strData,CString &sResult);
	static void CharToAsc(unsigned char ch1,char &ch2,char &ch3);
public:
	//3DES解密(CBC模式)
	static unsigned short SDFunc::TDESDecrypt(CString strData,CString &sResult);		
public:
	//生成非对称密钥对
	static unsigned short SDFunc::GenerateDissymKeys(CString &sResult);		
public:
	//取公钥数据;
	static unsigned short SDFunc::GetPubKeyData(CString &sResult);			
public:
	//SP公钥加密
	static unsigned short SDFunc::SPPubKeyEncrypt(CString strData,CString &sResult);
public:
	// 私钥加密
	static unsigned short SDFunc::PriKeyEncrypt(CString strData,CString &sResult);

public:
	// 取私钥加密结果
	static unsigned short SDFunc::GetPriKeyEnResult(CString &sResult);
public:
	// “挑战码方式”动态口令的生成	
    // Note: 动态口令的长度和8字节的挑战码之间以空格作为分隔符
	static unsigned short SDFunc::GenChaCodePw(CString strData,CString &sResult);	
public:
	// 导入SP公钥
	//只要输入公钥的N部分就可以
	static unsigned short SDFunc::WriteSPPubKey(CString strData,CString &sResult);
public:
	// 签名口令修改
	// Note:旧口令和新口令之间以空格作为分隔符
	static unsigned short SDFunc::ChangePw(CString strData,CString &sResult);
public:
	// 签名口令解锁
	//Note :解锁口令和新口令之间以空格作为分隔符,并且先输入解锁口令再输入新口令
	static unsigned short SDFunc::UnlockPw(CString strData,CString &sResult);
public:
	// 获得卡片数据
	static unsigned short SDFunc::GetSDData(CString &sResult);

public:
	static void SDFunc::AppendChar(WCHAR wchr,CString &str);
};

⌨️ 快捷键说明

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