Sub Class_Globals
Private Root As B4XView
Private xui As XUI
End Sub
Public Sub Initialize
' B4XPages.GetManager.LogEvents = True
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
Private Sub Button1_Click
Dim str = "Hello World" As String
Dim ComoBte() As Byte
ComoBte = str.GetBytes("utf8")
Dim ByteEncriptado() As Byte
ByteEncriptado = EncriptarS(ComoBte,"MyClave")
xui.MsgboxAsync("Hecho", "B4X")
End Sub
Sub EncriptarS(text() As Byte, Pass As String) As Byte()
Dim cl As B4XCipher
Return cl.Encrypt(text, Pass)
End Sub