上一页 1 2 3 4 5 6 7 ··· 13 下一页

2020年7月10日

c# md5 算法实现

摘要: 相对C#来说,md5算法就相对简单很多,因为 System.Security.Cryptography; 已经包含了md5算法。所以我们只需创建MD5类对象即可实现md5算法。下面举例说明: 例子:输入任意字符,打印出md5计算结果(16进制输出) using System; using Syste 阅读全文

posted @ 2020-07-10 15:32 Milo_lu 阅读(3306) 评论(0) 推荐(0)

define a struct

摘要: how to use a macro of structure ? Here I am listing steps for it by using a demo: macro a structure: #define structed_define \ { \ "this is a demo for 阅读全文

posted @ 2020-07-10 09:21 Milo_lu 阅读(154) 评论(0) 推荐(0)

2020年7月6日

file.open异常处理

摘要: 当打开一个不存在的文件名,那会导致读文件出现错误,导致程序崩溃。 为了避免类似问题,我们需要进行判断: //open file CFile file; file.Open("ReadMe.txt", CFile::modeRead,NULL);//open the file 文件打开返回是文件句柄, 阅读全文

posted @ 2020-07-06 12:03 Milo_lu 阅读(818) 评论(0) 推荐(0)

2020年7月3日

md5信息摘要算法 c++

摘要: 接上,用c++实现md5算法: #include <string.h> #include <stdio.h> #include <math.h> #include <stdlib.h> #include <float.h> #include <limits.h> #include <ctype.h> 阅读全文

posted @ 2020-07-03 17:06 Milo_lu 阅读(376) 评论(1) 推荐(0)

2020年7月2日

md5信息摘要算法 基于16位机器运行

摘要: MD5信息摘要算法(Message Digest Algorithm) md5是一种密码散列函数,可以生成128位(16字节)的散列值,用于确保信息传输完整一致。 这里举例如何在16机器上实现md5算法: md5.h 1 #ifndef MD5_H 2 #define MD5_H 3 4 typed 阅读全文

posted @ 2020-07-02 11:57 Milo_lu 阅读(344) 评论(1) 推荐(0)

2020年6月16日

c++ Ping 通过线程处理Ping功能(MFC)

摘要: Ping功能是测试网络是否连接的有效方式。通常我们需要通过ping来验证网络连接是否正常,这就需要我们经常用到ping功能。 ping是有一定的阻塞,如果频繁使用会导致应用程序出现阻塞现象,为了避免这种情况的发生,我们这里举例用线程的方式对网络进行ping来验证网络是否连接正常: UI布局 添加按键 阅读全文

posted @ 2020-06-16 14:15 Milo_lu 阅读(1208) 评论(1) 推荐(0)

2020年6月8日

c++ ping 功能实现(mfc)

摘要: 现在我们将代码移植到我们的mfc中,定义编辑款edit3为域名输入,IDC_IPADDRESS2为解析IP地址;Button1为启动测试控制键。 为button1添加bn_clicked事件回调函数: 设置button1文本context内容: CButton*pbutton = (CButton* 阅读全文

posted @ 2020-06-08 23:23 Milo_lu 阅读(1077) 评论(0) 推荐(0)

c++ ping 功能实现

摘要: 今天讲一下ping功能和解析域名获取ip地址: 代码如下: ping功能实现(默认超时时间2000ms): #include "stdafx.h" #include "Source.h" #include <iostream> USHORT CPing::s_usPacketSeq = 0; CPi 阅读全文

posted @ 2020-06-08 11:44 Milo_lu 阅读(1007) 评论(1) 推荐(1)

2020年6月2日

WinInet简介及操作流程

摘要: 我们这里主要要实现的功能是通过输入用户名和密码登录网站并读取网页内容: 调用的库为WinInet.h 用到工具fiddler抓包工具。 先抓包获取所需参数。 登录网站https://www.oschina.net/,登录,并输入密码和用户名; 打开fiddler工具 点击登录网页,开始抓包参数; 参 阅读全文

posted @ 2020-06-02 15:51 Milo_lu 阅读(1280) 评论(0) 推荐(0)

2020年5月30日

通过线程传递消息

摘要: 今天讲一下线程如何向对话框传递消息,步骤如下: 创建消息数,在xxDlg.h: #define WM_RESPONSE WM_USER+1 声明消息函数成员函数xxDlg.h: afx_msg LRESULT winMessageFun(WPARAM wParam, LPARAM lParam);  阅读全文

posted @ 2020-05-30 17:10 Milo_lu 阅读(330) 评论(2) 推荐(0)

上一页 1 2 3 4 5 6 7 ··· 13 下一页

导航