资源简介
使用vc++6.0 MFC创建的md5算法源码,可以直接引入使用。
代码片段和文件信息
// DialogMD5.cpp : implementation file
//
#include “MD5.h“
#include “MD5.cpp“
#include
#include
#include “stdafx.h“
#include “MFC_MD5.h“
#include “DialogMD5.h“
#include
using namespace std;
/////////////////////////////////////////////////////////////////////////////
// DialogMD5 dialog
DialogMD5::DialogMD5(CWnd* pParent /*=NULL*/)
: CDialog(DialogMD5::IDD pParent)
{
//{{AFX_DATA_INIT(DialogMD5)
m_file = _T(““);
m_file_string = _T(““);
//}}AFX_DATA_INIT
}
void DialogMD5::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(DialogMD5)
DDX_Control(pDX IDC_FILE m_list_file);
DDX_Text(pDX IDC_EDIT1 m_file);
DDX_LBString(pDX IDC_FILE m_file_string);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(DialogMD5 CDialog)
//{{AFX_MSG_MAP(DialogMD5)
ON_BN_CLICKED(IDC_PATH OnOpen)
ON_BN_CLICKED(IDC_SAVE OnSave)
ON_BN_CLICKED(IDC_CAU OnCau)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// DialogMD5 message handlers
void DialogMD5::OnOpen()
{
// TODO: Add your control notification handler code here
//CString fliter=“TXT FILEs(*.txt)“;
CFileDialog mydialog(true);//00OFN_OVERWRITEPROMPT|OFN_HIDEREADONLYfliter);
if(mydialog.DoModal()==IDOK)
{
m_file=mydialog.GetPathName();
UpdateData(FALSE);
}
m_list_file.AddString(m_file);
UpdateData(FALSE);
//mydialog.DoModal();
}
void DialogMD5::OnSave()
{
// TODO: Add your control notification handler code here
CFileDialog mydialog(false);
mydialog.DoModal();
}
void DialogMD5::OnCau()
{
// TODO: Add your control notification handler code here
/* CString str=m_file;
char cfile[10000];
CFile myfile;
myfile.Open(strCFile::modeCreate|CFile::modeReadWrite);
myfile.ReadHuge(cfile10000);
//************************
string password(cfile);
MD5_CTX *before_password;
before_password = new MD5_CTX();
unsigned char *tempfinal_string[16];
temp =(unsigned char *)password.c_str();
before_password->MD5Update(temppassword.size());
before_password->MD5Final(final_string);
long tmp[19];
for(int j=0;j<16;j++)
{
tmp[j]=final_string[j];
//cout< }
*/
//cout< }
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
.CA.... 30073 2011-08-30 10:06 VC++MD5code\MFC_MD5\Debug\DialogMD5.obj
.CA.... 23234 2011-08-30 10:06 VC++MD5code\MFC_MD5\Debug\MainFrm.obj
.CA.... 118856 2011-08-30 10:06 VC++MD5code\MFC_MD5\Debug\MFC_MD5.exe
.CA.... 324876 2011-08-30 10:06 VC++MD5code\MFC_MD5\Debug\MFC_MD5.ilk
.CA.... 22990 2011-08-30 10:06 VC++MD5code\MFC_MD5\Debug\MFC_MD5.obj
.CA.... 5500532 2011-08-30 10:06 VC++MD5code\MFC_MD5\Debug\MFC_MD5.pch
.CA.... 345088 2011-08-30 10:06 VC++MD5code\MFC_MD5\Debug\MFC_MD5.pdb
.CA.... 7260 2011-08-30 10:06 VC++MD5code\MFC_MD5\Debug\MFC_MD5.res
.CA.... 14759 2011-08-30 10:06 VC++MD5code\MFC_MD5\Debug\MFC_MD5Doc.obj
.CA.... 19705 2011-08-30 10:06 VC++MD5code\MFC_MD5\Debug\MFC_MD5View.obj
.CA.... 105620 2011-08-30 10:06 VC++MD5code\MFC_MD5\Debug\StdAfx.obj
.CA.... 254976 2011-08-30 10:06 VC++MD5code\MFC_MD5\Debug\vc60.idb
.CA.... 438272 2011-08-30 10:06 VC++MD5code\MFC_MD5\Debug\vc60.pdb
.CA.... 2351 2007-03-14 21:24 VC++MD5code\MFC_MD5\DialogMD5.cpp
.CA.... 1270 2007-03-14 20:31 VC++MD5code\MFC_MD5\DialogMD5.h
.CA.... 2571 2007-03-14 14:47 VC++MD5code\MFC_MD5\MainFrm.cpp
.CA.... 1470 2007-03-14 14:44 VC++MD5code\MFC_MD5\MainFrm.h
.CA.... 9752 2007-03-14 21:01 VC++MD5code\MFC_MD5\MD5.cpp
.CA.... 906 2007-03-14 21:01 VC++MD5code\MFC_MD5\MD5.h
.CA.... 28980 2011-08-30 10:05 VC++MD5code\MFC_MD5\MFC_MD5.APS
.CA.... 2596 2011-08-30 10:06 VC++MD5code\MFC_MD5\MFC_MD5.clw
.CA.... 4227 2007-03-14 14:31 VC++MD5code\MFC_MD5\MFC_MD5.cpp
.CA.... 4703 2007-03-14 21:05 VC++MD5code\MFC_MD5\MFC_MD5.dsp
.CA.... 539 2007-03-14 14:31 VC++MD5code\MFC_MD5\MFC_MD5.dsw
.CA.... 1367 2007-03-14 14:31 VC++MD5code\MFC_MD5\MFC_MD5.h
.CA.... 123904 2011-08-30 10:10 VC++MD5code\MFC_MD5\MFC_MD5.ncb
.CA.... 124928 2011-08-30 10:10 VC++MD5code\MFC_MD5\MFC_MD5.opt
.CA.... 2021 2011-08-30 10:06 VC++MD5code\MFC_MD5\MFC_MD5.plg
.CA.... 11710 2007-03-14 15:34 VC++MD5code\MFC_MD5\MFC_MD5.rc
.CA.... 1762 2007-03-14 14:31 VC++MD5code\MFC_MD5\MFC_MD5Doc.cpp
............此处省略19个文件信息
- 上一篇:自制杀毒软件C++源码
- 下一篇:mfc制作简单的中国地图
评论
共有 条评论