Foxtable(狐表)用户栏目专家坐堂 → [求助]如何获取文件的MD5校验码


  共有3217人关注过本帖树形打印复制链接

主题:[求助]如何获取文件的MD5校验码

帅哥哟,离线,有人找我吗?
Bin
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:35433 积分:178524 威望:0 精华:3 注册:2013/3/30 16:36:00
  发帖心情 Post By:2014/5/21 14:27:00 [显示全部帖子]


 回到顶部
帅哥哟,离线,有人找我吗?
Bin
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:35433 积分:178524 威望:0 精华:3 注册:2013/3/30 16:36:00
  发帖心情 Post By:2014/5/21 14:45:00 [显示全部帖子]

Dim FilePath As String ="C:\Users\foxtable1\Desktop\订货管理.foxdb"
Try
	Dim get_file As New System.IO.FileStream(FilePath, System.IO.FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.Read)
	Dim get_md5 As New System.Security.Cryptography.MD5CryptoServiceProvider()
	Dim hash_byte As Byte() = get_md5.ComputeHash(get_file)
	Dim resule As String = System.BitConverter.ToString(hash_byte)
	resule = resule.Replace("-", "")
	output.show( resule)
Catch e As Exception
	output.show( e.ToString())
End Try

 回到顶部