Bekijk de onderstaande video om te zien hoe je onze site als een web app op je startscherm installeert.
Opmerking: Deze functie is mogelijk niet beschikbaar in sommige browsers.
#Region "FiletoMD4"
Function FiletoMD4(ByVal fileloc As String) As String
Dim crypt As New ChilkatCrypt2
Dim succes As Long = crypt.UnlockComponent("30-day trial")
Dim returnstr As String
If succes <> 1 Then
MsgBox(crypt.LastErrorText)
returnstr = crypt.LastErrorText
Return returnstr
End If
crypt.HashAlgorithm = "md4"
crypt.EncodingMode = "hex"
returnstr = crypt.HashFileENC(fileloc)
Return returnstr
End Function
#End Region
Imports CHILKATCRYPT2Lib
Public Class Form1
#Region "FiletoMD4"
Function FiletoMD4(ByVal fileloc As String) As String
Dim crypt As New ChilkatCrypt2
Dim succes As Long = crypt.UnlockComponent("30-day trial")
Dim returnstr As String
If succes <> 1 Then
MsgBox(crypt.LastErrorText)
returnstr = crypt.LastErrorText
Return returnstr
End If
crypt.HashAlgorithm = "md4"
crypt.EncodingMode = "hex"
returnstr = crypt.HashFileENC(fileloc)
Return returnstr
End Function
#End Region
Private Sub OpenFile1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenFile1.Click
Dim strm As System.IO.Stream = Nothing 'Set stream
OpenFileDialog1.Title = "Select a File"
OpenFileDialog1.InitialDirectory = "C:" 'Start in this directory
OpenFileDialog1.ShowDialog()
Try
strm = OpenFileDialog1.OpenFile() 'Get the filename
Catch 'If file couldn't be openend show messagebox
MsgBox("Couldn't open file!", MsgBoxStyle.Critical)
End Try
If Not (strm Is Nothing) Then
Dim FileHash As String = FiletoMD4(OpenFileDialog1.FileName)
GetPathFile.Text = OpenFileDialog1.FileName.ToString() 'Get path of the file
GetHash.Text = FileHash.ToString.ToUpper 'Get MD4 hash of the file in uppercase
strm.Close()
End If
End Sub
End Class
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.