B4J Question [B4X] B4XCipher how to decrypt the result in vb.net

Alexander Stolte

Expert
Licensed User
Does anyone know how i can decrypt in vb.net the aes encrypted string i have encrypted with the B4XCipher?

B4X:
    Dim s As StringUtils
    Log(s.EncodeBase64(EncryptText("Test123!","1234")))

B4X:
Sub EncryptText(text As String, password As String) As Byte()
    Dim c As B4XCipher
    Return c.Encrypt(text.GetBytes("utf8"), password)
End Sub

result:
su3U1EJ7W8pnUO2Fq9eC0zGgeh8T/qp9gdjbZoTjeNjp1MGWTCgffQ==
 
Solution
Many wrong statements here.

The algorithm is open: https://github.com/AnywhereSoftware...nywheresoftware/b4a/object/B4XEncryption.java
The salt and IV are chosen randomly are are stored at the beginning of the encrypted message.
Does anyone know how i can decrypt in vb.net the aes encrypted string i have encrypted with the B4XCipher?
C# implementation: https://github.com/chrisleeuk/B4XEncryption.net (I haven't tested it myself).

EnriqueGonzalez

Well-Known Member
Licensed User
You can't. B4xencryption doesn't provide the salting bytes and doesn't provide the algorithm. If you want cross compatibility you need the encryption library
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Many wrong statements here.

The algorithm is open: https://github.com/AnywhereSoftware...nywheresoftware/b4a/object/B4XEncryption.java
The salt and IV are chosen randomly are are stored at the beginning of the encrypted message.
Does anyone know how i can decrypt in vb.net the aes encrypted string i have encrypted with the B4XCipher?
C# implementation: https://github.com/chrisleeuk/B4XEncryption.net (I haven't tested it myself).
 
Upvote 0
Solution
Top