Click here to Skip to main content
15,896,371 members
Articles / Programming Languages / C++

Simple Way to Crypt a File with CNG

Rate me:
Please Sign up or sign in to vote.
4.91/5 (37 votes)
9 May 2007CPOL5 min read 137.3K   2.8K   42  
Cryptography API: The Next Generation (CNG) - How to crypt documents with C++ programming (without an understanding of cryptography or security)
// CNGCryptFileDlg.h : header file
//

#pragma once


// CCNGCryptFileDlg dialog
class CCNGCryptFileDlg : public CDialog
{
	bool m_bEncrypt;
// Construction
public:
	CCNGCryptFileDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CListCtrlDemoDlg)
	enum { IDD = IDD_CNGCRYPTFILE_DIALOG };
	CListCtrl	m_lstLog;
	//}}AFX_DATA

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedButtonFile1();
	afx_msg void OnBnClickedButtonCrypt();
	afx_msg void OnBnClickedRadioCrypt();
	afx_msg void OnBnClickedRadioDecrypt();
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Welcome Italia spa
Italy Italy
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions