-
大小: 5.42MB文件類型: .rar金幣: 2下載: 0 次發布日期: 2023-09-26
- 語言: C/C++
- 標簽: des??Email??encryption??MFC??
資源簡介
通過DES實現郵件的實時加密的一套系統,包括對郵件的加密解密,整個系統是在VC6.0下 通過MFC實現的

代碼片段和文件信息
//?AddrBook.cpp?:?implementation?file
//
#include?“stdafx.h“
#include?“BuptMailer.h“
#include?“AddrBook.h“
#include?
#include?“NewAddrDlg.h“
#include?“DelDlg.h“
using?namespace?std;
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CAddrBook?dialog
CAddrBook::CAddrBook(CWnd*?pParent?/*=NULL*/)
:?CDialog(CAddrBook::IDD?pParent)
{
//{{AFX_DATA_INIT(CAddrBook)
//?NOTE:?the?ClassWizard?will?add?member?initialization?here
//}}AFX_DATA_INIT
}
void?CAddrBook::DoDataExchange(CDataExchange*?pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAddrBook)
DDX_Control(pDX?IDC_LIST1?m_list);
//}}AFX_DATA_MAP
DWORD?dwstyle=::GetWindowLong(m_hWndGWL_style);
????dwstyle|=LVS_REPORT|LVS_SHOWSELALWAYS|LVS_EDITLABELS;
::SetWindowLong(m_hWndGWL_styledwstyle);
dwstyle=m_list.GetExtendedstyle();
dwstyle|=LVS_EX_FULLROWSELECT;//LVS_EX_GRIDLINES|
????//設置擴展風格
m_list.SetExtendedstyle(dwstyle);
m_list.InsertColumn(0“姓名“LVCFMT_CENTER65-1);
????m_list.InsertColumn(1“EMail地址“LVCFMT_CENTER75-1);
????m_list.InsertColumn(2“公鑰“LVCFMT_CENTER82-1);
????m_list.InsertColumn(3“備注“LVCFMT_CENTER80-1);
/*********打開log文件,將記錄寫進列表框**********/
????ifstream?ifile(“addressLog.txt“);
char?c;
????int?nItem=0nSubItem=0;
CString?common;
while(ifile.good()){
ifile.get(c);
????????if(c!=‘$‘)?common+=c;
else{
//AfxMessageBox(common);?
switch(nSubItem){
case?0:??if(ifile.good()){m_list.InsertItem(nItemcommon);???nSubItem++;break;}
case?1:??if(ifile.good()){m_list.SetItemText(nItem1common);nSubItem++;break;}
case?2:??if(ifile.good()){m_list.SetItemText(nItem2common);nSubItem++;break;}
case?3:??if(ifile.good()){m_list.SetItemText(nItem3common);nSubItem=0;nItem++;break;}
default:?break;
}
common.Empty();
}//else
}//while
}
BEGIN_MESSAGE_MAP(CAddrBook?CDialog)
//{{AFX_MSG_MAP(CAddrBook)
ON_BN_CLICKED(IDC_BUTTON_EDIT?OnButtonEdit)
ON_BN_CLICKED(IDC_BUTTON_DEL?OnButtonDel)
ON_BN_CLICKED(IDC_BUTTON_SAVE?OnButtonSave)
ON_BN_CLICKED(IDC_BUTTON_ADD?OnButtonAdd)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CAddrBook?message?handlers
void?CAddrBook::onclickList1(NMHDR*?pNMHDR?LRESULT*?pResult)?
{
//?TODO:?Add?your?control?notification?handler?code?here
POSITION?pos?=?m_list.GetFirstSelectedItemPosition();
int?nItem;
if?(pos?==?NULL);
else{
nItem?=?m_list.GetNextSelectedItem(pos);
selectedAddress=m_list.GetItemText(nItem1);
selectedPK=m_list.GetItemText(nItem2);
}
*pResult?=?0;
}
void?CAddrBook::OnButtonEdit()?
{
//?TODO:?Add?your?control?notification?handler?code?here
CNewAddrDlg?dlg1;
????int?nItem;
POSITION?pos?=?m_list.GetFirstSelectedItemPosition();
if?(pos?==?NULL);
els
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????4900??2007-07-22?17:35??BuptMailer\AddrBook.cpp
?????文件???????1467??2007-07-22?15:52??BuptMailer\AddrBook.h
?????文件?????????24??2007-07-22?21:30??BuptMailer\addressLog.txt
?????文件???????1198??2007-07-22?11:27??BuptMailer\AddUserDlg.cpp
?????文件???????1306??2007-07-22?11:27??BuptMailer\AddUserDlg.h
?????文件??????13122??2007-07-16?23:53??BuptMailer\AES.cpp
?????文件???????1344??2007-07-16?23:52??BuptMailer\AES.h
?????文件???????6506??2007-07-16?21:32??BuptMailer\ba
?????文件???????1758??2005-08-17?22:02??BuptMailer\ba
?????文件??????16901??2007-07-04?10:48??BuptMailer\BigInt.cpp
?????文件???????2357??2007-04-13?00:23??BuptMailer\BigInt.h
?????文件??????56812??2007-07-22?21:32??BuptMailer\BuptMailer.aps
?????文件???????8407??2007-07-22?21:51??BuptMailer\BuptMailer.clw
?????文件???????4363??2007-07-22?02:33??BuptMailer\BuptMailer.cpp
?????文件???????7029??2007-07-22?21:33??BuptMailer\BuptMailer.dsp
?????文件????????545??2007-07-22?02:33??BuptMailer\BuptMailer.dsw
?????文件???????1400??2007-07-22?02:33??BuptMailer\BuptMailer.h
?????文件?????164864??2007-07-22?21:57??BuptMailer\BuptMailer.ncb
?????文件??????62976??2007-07-22?21:57??BuptMailer\BuptMailer.opt
?????文件???????1914??2007-07-22?21:57??BuptMailer\BuptMailer.plg
?????文件??????20275??2007-07-22?21:32??BuptMailer\BuptMailer.rc
?????文件???????1822??2007-07-22?02:33??BuptMailer\BuptMailerDoc.cpp
?????文件???????1519??2007-07-22?02:33??BuptMailer\BuptMailerDoc.h
?????文件???????5606??2007-07-22?21:04??BuptMailer\BuptMailerView.cpp
?????文件???????2271??2007-07-22?21:44??BuptMailer\BuptMailerView.h
?????文件??????????0??2007-07-22?21:20??BuptMailer\de.txt.des
?????文件?????223093??2007-07-22?20:25??BuptMailer\Debug\AddrBook.obj
?????文件??????13746??2007-07-22?20:25??BuptMailer\Debug\AddUserDlg.obj
?????文件??????18683??2007-07-22?20:25??BuptMailer\Debug\AES.obj
?????文件??????28707??2007-07-22?21:57??BuptMailer\Debug\ba
............此處省略84個文件信息
- 上一篇:C++并發編程實戰(英文版)
- 下一篇:用VC編寫的串口示波器,可以實時顯示波形
評論
共有 條評論