#Region Project Attributes
#CommandLineArgs:
#MergeLibraries: True
#AdditionalJar: bcprov-jdk15on-150
#End Region
Sub Process_Globals
End Sub
Sub AppStart (Args() As String)
'No encryption:
Dim Start As Long = DateTime.Now
For i = 1 To 1000
Dim s As String = "mystring"
Dim b() As Byte = s.GetBytes("UTF8")
Dim ss As String = BytesToString(b, 0, b.Length, "UTF8")
Next
Log("no Encrypt/Decrypt time: " & (DateTime.Now - Start) & " ms.")
'With encryption / decryption:
Dim Cipher As B4XCipher
Dim Start As Long = DateTime.Now
For i = 1 To 1000
'Encrypt
Dim s As String = "mystring"
Dim b() As Byte = Cipher.Encrypt(s.GetBytes("UTF8"), "pwd")
'Decrypt
Dim bb() As Byte = Cipher.Decrypt(b, "pwd")
Dim ss As String = BytesToString(bb, 0, bb.Length, "UTF8")
Next
Log("Encrypt/Decrypt time: " & (DateTime.Now - Start) & " ms.")
End Sub