资源简介
演示了如何使用CryptAPI接口访问CSP,获取容器信息以及使用加解密接口对文件进行加解密和签名验证。
代码片段和文件信息
// CSPDemo.cpp : Defines the class behaviors for the application.
//
#include “stdafx.h“
#include “CSPDemo.h“
#include “CSPDemoDlg.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CCSPDemoApp
BEGIN_MESSAGE_MAP(CCSPDemoApp CWinApp)
//{{AFX_MSG_MAP(CCSPDemoApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP CWinApp::onhelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CCSPDemoApp construction
CCSPDemoApp::CCSPDemoApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CCSPDemoApp object
CCSPDemoApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CCSPDemoApp initialization
BOOL CCSPDemoApp::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
CCSPDemoDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
// Since the dialog has been closed return FALSE so that we exit the
// application rather than start the application‘s message pump.
return FALSE;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 147559 2010-05-04 20:06 Bin\CSPDemo.exe
文件 62004 2010-10-24 13:21 CSPDemo\CSPDemo.aps
文件 1876 2010-10-24 13:21 CSPDemo\CSPDemo.clw
文件 2077 2009-06-21 16:43 CSPDemo\CSPDemo.cpp
文件 4456 2010-03-13 12:17 CSPDemo\CSPDemo.dsp
文件 539 2010-10-24 13:19 CSPDemo\CSPDemo.dsw
文件 1335 2009-06-21 16:43 CSPDemo\CSPDemo.h
文件 50176 2010-10-24 13:21 CSPDemo\CSPDemo.ncb
文件 48640 2010-10-24 13:21 CSPDemo\CSPDemo.opt
文件 7835 2010-10-24 13:20 CSPDemo\CSPDemo.plg
文件 260 2010-10-24 13:21 CSPDemo\CSPDemo.positions
文件 6306 2010-10-24 13:21 CSPDemo\CSPDemo.rc
文件 25729 2010-10-24 13:21 CSPDemo\CSPDemoDlg.cpp
文件 1750 2010-10-24 13:21 CSPDemo\CSPDemoDlg.h
文件 3597 2009-06-21 16:43 CSPDemo\ReadMe.txt
文件 25214 2008-12-02 09:02 CSPDemo\res\CSPDemo.ico
文件 399 2009-06-21 16:43 CSPDemo\res\CSPDemo.rc2
文件 1078 2009-06-21 16:43 CSPDemo\res\CSPDemo1.ico
..A.SH. 5632 2009-11-05 20:47 CSPDemo\res\Thumbs.db
文件 1283 2009-11-28 14:05 CSPDemo\resource.h
文件 209 2009-06-21 16:43 CSPDemo\StdAfx.cpp
文件 1054 2009-06-21 16:43 CSPDemo\StdAfx.h
文件 96 2010-10-24 13:23 功能说明.txt
目录 0 2010-10-24 13:19 CSPDemo\res
目录 0 2010-10-24 13:22 Bin
目录 0 2010-10-24 13:22 CSPDemo
----------- --------- ---------- ----- ----
399104 26
- 上一篇:16*16LED汉字显示
- 下一篇:电商主站首页流程图
评论
共有 条评论