Hi, I'm starting visual basic and I wanted to do the following read a file and be able to make a split knowing its delimiter. But in my case the route is going to be the same file running then I do the following:
Dim drop() As String = Split(System.IO.File.ReadAllText(Application.ExecutablePath), "[SPLITTER]")
What I was trying to do is to do both separately or at least look for another way to read my file and use a split, it just occurs to me if you want some expert to know how to do it.
At the same time what I do is encrypt:
Function unsecure(ByVal data As Byte()) As Byte()
Using sa As New System.Security.Cryptography.RijndaelManaged
sa.IV = New Byte() {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7}
sa.Key = New Byte() {7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1}
Return sa.CreateDecryptor.TransformFinalBlock(data, 0, data.Length)
End Using
End Function
Dim drop() As String = Split(System.IO.File.ReadAllText(Application.ExecutablePath), "[SPLITTER]")
Dim File1 As Byte() = unsecure(Convert.FromBase64String(drop(1)))
Dim File2 As Byte() = unsecure(Convert.FromBase64String(drop(3)))
But I do not understand exactly what it does? encrypts and decrypts the chain ?. And another question is if I could dispense with it in the following way:
Dim File1 As Byte() = Convert.FromBase64String(drop(1))
Dim File2 As Byte() = Convert.FromBase64String(drop(3))
And if I ask is because I do not understand this method - > FromBase64String. I think it's to get the decoded string? I am very new in visual basic so any criticism is welcome.