Dim bc As ByteConverter
Dim c As B4XCipher
Dim str As String
Dim data() As Byte
Dim encryption() As Byte
Dim msg As Msgboxes
If txtExpDate.Text = "" Then
mDate = "0/0/0000"
Else
mDate = txtExpDate.text
End If
str = txtUser.Text & "," & txtIMEI.Text & "," & mDate
data = bc.StringToBytes(str, "UTF-8")
encryption = c.Encrypt(data, "xxxxxxxxxxxxxxxx")
File.MakeDir(File.DirApp, "b4i\" & txtIMEI.Text)
File.WriteString(File.DirApp & "\b4i\" & txtIMEI.Text, "RemSysLic.lic", bc.StringFromBytes(encryption, "UTF-8"))
msg.Show("License created in folder " & File.DirApp & "\b4i\" & txtIMEI.Text & ".", "")