aes encryption

  1. byz

    Android Example Align the AES encryption and decryption results between B4X and the .NET platform

    A C# friend who uses MAUI to develop Android apps, but the friend works well, so I recommend him to use B4A, and he got started after a few hours of basic tutorials. He implemented a way to make AES encryption and decryption results consistent across B4X and .NET platforms. I converted the...
  2. KMatle

    B4R Tutorial ESP32: AES256 encrypted & Base64 encoded post message to and from PHP

    Example: - AES256 encrypt a message with IV and Salt - Base64 encode it - send a http post request to a php script - decrypt in php - send back a AES256 encrypted and Base64 encoded message to the ESP32 Note: - change SSID & PW & IP-Address/foldername/scriptname - message must be padded to a...
  3. KMatle

    B4R Tutorial AES256 encrypted BLE (ESP32 & B4A) example

    I took Erel's BLE example and added (as on the ESP32 side) AES256 encryption. For some reasons I wasn't able to use SPIFFS and/or WiFi parallel to BLE on the ESP32 side. Maybe you find a reason why this doesn't word (I understand WiFi & BLE using the same antenna, but SPIFFS should work but...
  4. KMatle

    B4J Tutorial [B4x]Padding/depadding PKCS7/5 and other

    EDIT: If the message length is equal to the pad length, you have to pad to the next multiple. E.g. 16 bytes would be padded to 32 because one would not know how long the message was because the last byte defines the number of added (=padded) values. Here's another example to pad/depad data for...
  5. KMatle

    B4J Code Snippet [B4x] AES-256 encryption with salt and iv (works with all platforms like php, .net, etc.)

    This example is based on agrahams encryption library: Encryption Lib 1. Generate a 32 byte pw (just call the sub) and store it 2. Encrypt the data by calling AES_Encrypt. Return is a byte array or a base64 encoded string 3. Salt is a random value which is added at the beginning of the encrypted...
  6. N

    Android Question Read a big file an encrypt this using RandomAccessFile(RAF)

    Hi Guys i want to make a file encrypter ... normally for larg files i get OutOfMemory error ... how i can use RAF for this work ? Sub ReadFile(Dir As String, flname As String) As Byte() Dim out As OutputStream out.InitializeToBytesArray(100) 'size not really important...
  7. P

    B4J Question Encryption method to store sensitive information

    Hello all, Happy New year I am designing an application that has a need to store sensitive information ( CC with CVV ) for recurring payments. ( Yes, I know we should avoid this where possible ) I have looked at various methods of doing this. 1. Encrypt data in B4J and store it in the DB...
  8. ALBRECHT

    Android Question aes encryption with key and iv => decryption server side

    Hello, After looking for some days the right way to decrypt and check via my API (in ASP vbscript) from a remote server, a string sent by poststring from my APP and encrypted with AES 128bits with key and iv specific , I can share my result with you : App Side Sub : Sub...
  9. KMatle

    Android Tutorial [B4x] AES Encryption (lessons learned & best practice)

    Last weekend I migrated my XAMPP test environment (Apache/PHP/MySql). It came with PHP 7.x. Yesterday I wanted to test one of my Apps using AES and Mcrypt for it in PHP but it didn't work no more. I noticed that MCrypt was deprecated anyway and even was removed due to security and other issues...
  10. N

    iOS Question Error decoding data as string AES Decryption

    Please am getting this error when decrypting an encrypted string using IV and . "Error decoding data as string." When I Use Dim result As String= BytesToString(data,0,data.Length,"UTF-8") <B4IExceptionWrapper: Error Domain=caught_exception Code=0 " Error decoding data as string."...
Top