Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Shared Function GenerateHash(ByVal FilePath As IO.FileInfo) As String
- If (FilePath Is Nothing) Then
- Throw New ArgumentNullException("FilePath")
- End If
- Dim _sha As New Security.Cryptography.MD5CryptoServiceProvider
- Dim _Hash = Convert.ToBase64String(_sha.ComputeHash(New IO.FileStream(FilePath.FullName, IO.FileMode.Open, IO.FileAccess.Read)))
- Return _Hash
- End Function
Add Comment
Please, Sign In to add comment