Mach dir mal ne Form mit 2 Listboxen und teste das mal...
Code:
Public Class Form1
Private Sub Button1_Click() Handles Button1.Click
If Byte_Crypt_Simple("F:\come.exe") = 0 Then
MsgBox("Datei eingelesen!")
Else
MsgBox("Fehler.")
End If
Byte_DECrypt_Simple()
End Sub
Public Function Byte_Crypt_Simple(ByVal path As String)
Try
Dim file() As Byte = System.IO.File.ReadAllBytes(path)
For Each item In file
ListBox1.Items.Add(CInt(item * 2 * 0.5))
Application.DoEvents()
Next
Return 0
Catch ex As Exception
Return 1
End Try
End Function
Public Function Byte_DECrypt_Simple()
Try
For Each item In ListBox1.Items
ListBox2.Items.Add(CInt(item / 2 / 0.5))
Next
Return 0
Catch ex As Exception
Return 1
End Try
End Function
End Class
Das liest die Datei byteweise und "crypted" jedes Byte.
So kannst du den Code nicht in nem Crypter benutzen, aber für eine einfache Verschlüsselung reicht er.
Ich hoffe du weisst wie "Byte() -> Datei" geht?