B4J Question AES128 ECB Decrypt - aaronk    
Aug 21, 2019Hi,
I am trying to decrypt a message using AES128 in ECB mode, and not CBC mode.
The data I am trying to decrypt is sent to my B4J as AES-128 in ECB mode, and that data I have put into a string called 'dataToDecrypt' in my code below.
When I run the following code I get the following... that encrypted the string that was sent
kg.Initialize("AES")
kg.KeyFromBytes(Key.GetBytes("UTF8"))
C.Initialize("AES/ECB/NoPadding") ' not 100% sure...
B4J Library [B4X] B4J/B4A: AES-GCM 256-bit encryption (Optional 128‑bit Salt) - Peter Simpson    
Feb 10, 2026   
(6 reactions)Hello Everyone,
Here is a B4J/B4A AES-GCM Encryption library, I created it for a project. Hopefully the B4X community will find this library extremely useful.
About AES‑GCM:
AES‑GCM (Advanced... that provides both data confidentiality and integrity. It uses AES‑256 in Counter (CTR) mode for...: Peter Simpson
Version: 1.0
AESGCMEncryption
AESGCMEncryption
AES‑256 GCM encrypted preferences engine for B4A and B4J.
Features:
- AES/GCM/NoPadding authenticated encryption...
B4A Library AES Encrypt/Decrypt (Encryption/Decryption) B4A and B4J library - Peter Simpson    
Sep 22, 2020   
(33 reactions)   
tags: Aes AES library, I created it some time ago for AES Encryption and Decryption of strings. I've been...
SecretKey As String
Functions:
AESDecrypt (DecryptData As String) As String
Decrypt AES encoded...
link: Is there way to generate cmac ? And than validate data using cmac ?
(CMAC) is the Cipher-based Mes...
link:
Hi, what is equivalent code in VB.NET ? example please.
I've send you a PM with my .Net DLL fi...
link: Hi, what is equivalent code in VB.NET ? example please....
B4J Code Snippet [B4x] AES-256 encryption with salt and iv (works with all platforms like php, .net, etc.) - KMatle    
Feb 19, 2021   
(14 reactions) (just call the sub) and store it
2. Encrypt the data by calling AES_Encrypt. Return is a byte array or... is used to scramble the order of the blocks (AES is a block cypher method). With this method you always...
link:
I had to connect AES-256-CBC B4A<->PHP and I'm pretty sure not only me fight...
link:
correct code for reference:
Public Sub AES_Encrypt(data As String, secretkey As String...
link: error: Input length must be multiple of 16 when decrypting with padded cipher
Public Sub AES_Encrypt...
B4J Library [PyBridge] pyCryptography - Encryption (AES + HMAC) with cryptography via PyBridge - zed    
Sep 20, 2025   
(6 reactions)This library offers a simple, secure, and powerful solution for encrypting and decrypting sensitive data (emails, addresses, phone numbers, etc.)
directly from a B4J application, leveraging the robustness of the Python cryptography library.
The Lib exposes three main methods:
GetKey: Generates a secure Fernet key (AES 128 + HMAC)
Encrypt: Encrypts a text string with this key
Decrypt...)
Benefits:
Strong security thanks to Fernet (AES + HMAC)
Easy integration into any B4J app
No...
B4i Question [SOLVED] [B4X] Decode AES encoded STRING - Mike1970    
Feb 24, 2023 from the app.
example tool: https://encode-decode.com/aes256-encrypt-online/
1. Crypt a text...
Algo: AES256
It is not important that is AES256 or AES128 etc... my goal is to be able to decode...
link: ("AES/CBC/PKCS5Padding")
To use AES encryption in B4i which is compatible with B4A, B4J and...
link:
Hope it helps if you not solve it yet
Public Sub SetAES(Mess As String, Key As String, Encrypt...
link: I'm using this two websites to generate the AES256 encrypted text (two because in this way...
B4R Tutorial AES256 encrypted BLE (ESP32 & B4A) example - KMatle    
Feb 2, 2023   
(3 reactions)I took Erel's BLE example and added (as on the ESP32 side) AES256 encryption. For some reasons... can recognize the ESP). This name is used as the AES256 password to encrypt the data so every ESP (or at every.... An array for the serializator is created (her with 3 items) and serialized
3. AES needs a data...
link: Is it real to add a B4J version to work from Windows also ? By a current system Windows BLE adapter\driver....
link:
For some reasons I wasn't able to use SPIFFS and/or WiFi parallel to BLE on the ESP32 side
Let me help you with that, I already...
B4A Tutorial [B4x] AES Encryption (lessons learned & best practice) - KMatle    
Oct 4, 2018   
(28 reactions). Yesterday I wanted to test one of my Apps using AES and Mcrypt for it in PHP but it didn't work no more... and tried to migrate my code to it. Until then I was using AES-128 Bit. After reading some articles I learned some new things which I want to write down here. Using AES is quite simple if you know... which use RSA (https://) I use AES addtionally and encrypt ALL data I send/receive to/from them...
link: Python Version
from Crypto.Cipher import AES
from base64 import b64decode, b64encode
KeyText...
B4A Question B4a Cipher (AES) vs. VB.NET 2017 Encryption - Jeffrey Cameron    
Sep 5, 2017I'm trying to use AES on the Android side, for a simple example, here's my encryption block
Public Sub AES_Encrypt(DataToEncrypt As String) As String
Dim poKG As KeyGenerator
Dim poCy As Cipher
Dim poBC As ByteConverter
Dim poData() As Byte
' doing AES
poCy.Initialize("AES")
' set InitializationVector value
poCy.InitialisationVector = poBC.StringToBytes(USER_IV16, "utf8")
' Generate a key
poKG.Initialize("AES...
B4A Question decrypt datas with AES/CBC system - sirjo66    
Jan 31, 2017Hello,
I need to decrypt data with AES/CBC system,
here is my VB.NET routine that I need to convert in B4A:
Public Function AES_Decrypt(ByVal input As String, ByVal IV As String, ByVal pass...
Dim AES As New System.Security.Cryptography.RijndaelManaged
AES.Padding = System.Security.Cryptography.PaddingMode.PKCS7
AES.Mode = System.Security.Cryptography.CipherMode.CBC
AES.KeySize = 128
AES.BlockSize = 128
AES.IV = IVb
AES.Key = passB
Dim DESDecrypter As System.Security...
Page: 1  
2  
3  
4  
5  
6  
7