-
-
Save NKid/ca1aff5c13326a224170 to your computer and use it in GitHub Desktop.
MD5 HASH
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' <summary> | |
''' 計算MD5 HASH | |
''' </summary> | |
''' <returns></returns> | |
''' <remarks></remarks> | |
Private Function GenMD5Hash(ByVal FilePath As String) As String | |
'Using fs As FileStream = File.OpenRead(MAIN_EXE_PATH) | |
Using fs As FileStream = New FileStream(FilePath, FileMode.Open, FileAccess.Read, FileShare.Read) | |
Dim md5Gen As MD5 = MD5.Create() | |
Dim sb As StringBuilder = New StringBuilder | |
For Each b As Byte In md5Gen.ComputeHash(fs) | |
sb.Append(b.ToString("X2")) | |
Next | |
Return sb.ToString() | |
End Using | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment