2 Commits

Author SHA1 Message Date
Jonathan Jenne
e0df4da27d Filesystem: Version 1.0.4 2021-05-04 11:10:32 +02:00
Jonathan Jenne
5391bb8d79 File: clean up GetChecksum 2021-05-04 11:10:06 +02:00
2 changed files with 7 additions and 6 deletions

View File

@@ -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

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.3.0")>
<Assembly: AssemblyFileVersion("1.0.3.0")>
<Assembly: AssemblyVersion("1.0.4.0")>
<Assembly: AssemblyFileVersion("1.0.4.0")>