i need to Encrypt Text with B4XCipher ,save it to sqlite (as string) ,then able to get it back
this code not work with me
this code not work with me
B4X:
Sub MakeText(text As String) As String
Dim c As B4XCipher,CC() As Byte
CC=c.Encrypt(text.GetBytes("utf8"),PPWW)
Return BytesToString(CC,0,CC.Length, "utf8")
End Sub
Sub GetMyText(tx1 As String) As String
Dim En1() As Byte =tx1.GetBytes("utf8")
Dim c As B4XCipher
Dim b() As Byte = c.Decrypt(En1,PPWW)
Return BytesToString(b, 0, b.Length, "utf8")
End Sub