B4J Question B4JEncryption lilbrary error

victormedranop

Well-Known Member
Licensed User
Longtime User
Hi I'm traying to use this library but I got this error using the same sample functions.
the release of this library is 1.0

B4X:
   Dim encryptedData() As Byte = EncryptText(root.Get("DATA"),"xx1100")
   Log(DecryptText(encryptedData,"xx1100"))


B4X:
Sub EncryptText(ff As String, XPASSWORD As String) As Byte()
 Dim c As B4XCipher
 Return c.Encrypt(ff.GetBytes("utf8"), XPASSWORD)
End Sub
Sub DecryptText(EncryptedData() As Byte, XPASSWORD As String) As String
 Dim c As B4XCipher
 Dim b() As Byte = c.Decrypt(EncryptedData, XPASSWORD)
 Return BytesToString(b, 0, b.Length, "utf8")
End Sub

B4J Version: 6.51
Parsing code. (0.03s)
Building folders structure. (0.03s)
Compiling code. (0.17s)
Compiling layouts code. (0.00s)
Organizing libraries. (0.00s)
Compiling generated Java code. Error
B4J line: 1182
Dim b() As Byte = c.Decrypt(EncryptedData, XPASSW
javac 1.8.0_171
src\net\nowyouseeme\pmultiples\clientconnect.java:1640: error: cannot access DataLengthException
_b = _c.Decrypt(_encrypteddata,_xpassword);
^
class file for org.bouncycastle.crypto.DataLengthException not found
 
Top