資源簡介
該系統(tǒng)是在MFC的框架上進(jìn)行編寫。系統(tǒng)實(shí)現(xiàn)過程如下:用POP3協(xié)議完成郵件接收,用SMTP協(xié)議完成郵件的發(fā)送,并且對原文內(nèi)容進(jìn)行AES加密。然后對AES的密鑰進(jìn)行RSA加密,并將加密后的AES密鑰隨郵件的正文一起發(fā)送給接收方。而接收方在收到郵件之后,首先還原出AES密鑰,接著對郵件的內(nèi)容進(jìn)行解密,還原出郵件正文。

代碼片段和文件信息
//?Add.cpp?:?implementation?file
//
#include?“stdafx.h“
#include?“email.h“
#include?“Add.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CAdd?dialog
CAdd::CAdd(CWnd*?pParent?/*=NULL*/)
:?CDialog(CAdd::IDD?pParent)
{
//{{AFX_DATA_INIT(CAdd)
m_mingzi?=?_T(““);
m_address?=?_T(““);
m_RSAe?=?_T(““);
m_RSAn?=?_T(““);
//}}AFX_DATA_INIT
}
void?CAdd::DoDataExchange(CDataExchange*?pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAdd)
DDX_Text(pDX?IDC_EDIT1?m_mingzi);
DDX_Text(pDX?IDC_EDIT2?m_address);
DDX_Text(pDX?IDC_EDIT8?m_RSAe);
DDX_Text(pDX?IDC_EDIT3?m_RSAn);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAdd?CDialog)
//{{AFX_MSG_MAP(CAdd)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CAdd?message?handlers
void?CAdd::OnOK()?
{
//?TODO:?Add?extra?validation?here
int?length;
UpdateData(TRUE);
GetDlgItemText(IDC_EDIT1?m_mingzi);?
GetDlgItemText(IDC_EDIT2?m_address);?
GetDlgItemText(IDC_EDIT3?m_RSAn);
GetDlgItemText(IDC_EDIT8?m_RSAe);
CString?str?=?m_mingzi?+?““?+?m_address?+?““?+?m_RSAn?+?““?+?m_RSAe;
str?+=?“\n“;
length=str.GetLength();
// FileSave(strlength);
m_Info.strname=m_mingzi;
m_Info.straddress=m_address;
m_Info.strRSAn=m_RSAn;
m_Info.strRSAe=m_RSAe;
m_mingzi=““;
m_address=““;
m_RSAn=““;
m_RSAe=““;
UpdateData(FALSE);
CDialog::OnOK();
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????1611??2008-07-06?16:36??email\Add.cpp
?????文件???????1239??2008-07-06?16:30??email\Add.h
?????文件???????9982??2007-06-07?23:58??email\Aes.cpp
?????文件???????5655??2007-05-23?22:34??email\Aes.h
?????文件??????25548??2007-10-24?12:42??email\Bignum.cpp
?????文件???????3722??2007-10-24?12:42??email\bignum.h
?????文件??????35838??2008-07-07?09:56??email\Debug\Add.obj
?????文件??????????0??2008-07-07?09:56??email\Debug\Add.sbr
?????文件??????36155??2008-07-07?09:56??email\Debug\Aes.obj
?????文件??????????0??2008-07-07?09:56??email\Debug\Aes.sbr
?????文件?????104633??2008-07-07?09:56??email\Debug\Bignum.obj
?????文件??????????0??2008-07-07?09:56??email\Debug\Bignum.sbr
?????文件????3679232??2008-07-07?09:57??email\Debug\email.bsc
?????文件?????188495??2008-07-07?09:57??email\Debug\email.exe
?????文件?????361300??2008-07-07?09:57??email\Debug\email.ilk
?????文件??????29655??2008-07-07?09:56??email\Debug\email.obj
?????文件????9356864??2008-07-07?09:56??email\Debug\email.pch
?????文件?????566272??2008-07-07?09:56??email\Debug\email.pdb
?????文件???????5012??2008-07-07?09:56??email\Debug\email.res
?????文件??????????0??2008-07-07?09:56??email\Debug\email.sbr
?????文件??????49655??2008-07-07?09:56??email\Debug\emailDlg.obj
?????文件??????????0??2008-07-07?09:56??email\Debug\emailDlg.sbr
?????文件??????55123??2008-07-03?23:13??email\Debug\jmail.tlh
?????文件??????56839??2008-07-03?23:13??email\Debug\jmail.tli
?????文件??????????0??2011-04-15?13:21??email\Debug\list.txt
?????文件?????109682??2008-07-07?09:57??email\Debug\shouxin.obj
?????文件??????????0??2008-07-07?09:57??email\Debug\shouxin.sbr
?????文件?????120243??2008-07-07?09:56??email\Debug\StdAfx.obj
?????文件????1744968??2008-07-07?09:56??email\Debug\StdAfx.sbr
?????文件?????246784??2008-07-07?09:57??email\Debug\vc60.idb
............此處省略54個(gè)文件信息
評論
共有 條評論