I have some problems to encrypt simple strings. The problem is, that an emty string ("") after encrypt and decrypt isn't longer an emty string. It's an array of bytes with a length of 16. How is it possible to get the emty string after decryption?
B4X:
Sub Encrypt(Zeichenkette As String) As Byte()
Dim ByteArray() As Byte
ByteArray=Cipher1.Encrypt(Zeichenkette.GetBytes("UTF8"), "xxxxx")
Return ByteArray
End Sub
Sub Decrypt(Zeichenkette() As Byte) As String
Dim ByteArray() As Byte
ByteArray=Cipher1.Decrypt(Zeichenkette, "xxxxx")
Return BytesToString(ByteArray, 0, ByteArray.Length, "UTF8")
End Sub