I have been able to resolve the problem with the following changes to the class:
Now, the hash generated is the same hash as shown when using certutil.exe.Code:Imports System Imports System.IO Imports System.Text Imports System.Security.Cryptography Public Class SHA Public Shared Function GenerateSHA512String(ByVal inputString As String) As String Using SHA512 As SHA512 = SHA512Managed.Create() Using fileStream As FileStream = File.OpenRead(inputString) Return BitConverter.ToString(SHA512.ComputeHash(fileStream)).Replace("-", "").ToLowerInvariant() End Using End Using End Function End Class




Reply With Quote
