chore: 漏了一个
This commit is contained in:
@@ -1075,15 +1075,16 @@ Public Module ModBase
|
|||||||
Re:
|
Re:
|
||||||
Try
|
Try
|
||||||
'获取 MD5
|
'获取 MD5
|
||||||
Dim File As New FileStream(FilePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)
|
Using File As New FileStream(FilePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)
|
||||||
Using h = MD5Cng.Create()
|
Using h = MD5Cng.Create()
|
||||||
Dim Retval As Byte() = h.ComputeHash(File)
|
Dim Retval As Byte() = h.ComputeHash(File)
|
||||||
Dim Result As New StringBuilder(Retval.Length * 2)
|
Dim Result As New StringBuilder(Retval.Length * 2)
|
||||||
For i = 0 To Retval.Length - 1
|
For i = 0 To Retval.Length - 1
|
||||||
Result.Append(Retval(i).ToString("x2"))
|
Result.Append(Retval(i).ToString("x2"))
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Return Result.ToString
|
Return Result.ToString
|
||||||
|
End Using
|
||||||
End Using
|
End Using
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
If Retry OrElse TypeOf ex Is FileNotFoundException Then
|
If Retry OrElse TypeOf ex Is FileNotFoundException Then
|
||||||
|
|||||||
Reference in New Issue
Block a user