File: clean up GetChecksum
This commit is contained in:
parent
42f9c04b24
commit
5391bb8d79
@ -73,10 +73,11 @@ Public Class File
|
||||
End Function
|
||||
|
||||
Public Function GetChecksum(FilePath As String) As String
|
||||
Using oStream As New BufferedStream(IO.File.OpenRead(FilePath), 1200000)
|
||||
Dim oSHA As New SHA256Managed()
|
||||
Dim oChecksum() As Byte = oSHA.ComputeHash(oStream)
|
||||
Return BitConverter.ToString(oChecksum).Replace("-", String.Empty)
|
||||
Using oFileStream = IO.File.OpenRead(FilePath)
|
||||
Using oStream As New BufferedStream(oFileStream, 1200000)
|
||||
Dim oChecksum() As Byte = SHA256.Create.ComputeHash(oStream)
|
||||
Return BitConverter.ToString(oChecksum).Replace("-", String.Empty)
|
||||
End Using
|
||||
End Using
|
||||
End Function
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user