MD5 Scan
I want to scan for a select list of MD5 checksums, and if found, delete the file. how would i go about doing this? i have absolutely no idea S:
edit: I mean like scanning a computer for files with md5 checksums, like a virus scanner scanning for the md5 checksums of known viruses.
[php]Imports System.Security.Cryptography
Imports System.Text
Imports System.IO
Public Function MD5FileHash(ByVal sFile As String) As String
Dim MD5 As New MD5CryptoServiceProvider
Dim Hash As Byte()
Dim Result As String = ""
Dim Tmp As String = ""
Dim FN As New FileStream(sFile, FileMode.Open, FileAccess.Read, FileShare.Read, 8192)
MD5.ComputeHash(FN)
FN.Close()
Hash = MD5.Hash
For i As Integer = 0 To Hash.Length - 1
Tmp = Hex(Hash(i))
If Len(Tmp) = 1 Then Tmp = "0" & Tmp
Result += Tmp
Next
Return Result
End Function[/php]
I don't understand your question.