Private Function SHA256File(ByVal input As String) As String
Dim rdr As FileStream
Dim sha As New SHA256Managed
Dim bytes() As Byte
Dim output As String = ""
If File.Exists(input) Then
rdr = New FileStream(input, FileMode.Open, FileAccess.Read)
bytes = sha.ComputeHash(rdr)
For Each b As Byte In bytes
output += b.ToString("x2")
Next
End If
Return output
End Function
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.