B4J Question B4JEncryption lilbrary error

Discussion in 'B4J Questions' started by victormedranop, Oct 10, 2018.

  1. victormedranop

    victormedranop Well-Known Member Licensed 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

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

    Code:
    Sub EncryptText(ff As String, XPASSWORD As StringAs Byte()
     
    Dim c As B4XCipher
     
    Return c.Encrypt(ff.GetBytes("utf8"), XPASSWORD)
    End Sub
    Sub DecryptText(EncryptedData() As Byte, XPASSWORD As StringAs 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
     
  2. victormedranop

    victormedranop Well-Known Member Licensed User

  3. Erel

    Erel Administrator Staff Member Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice