aes-encryption-with-url-encoding
Service icon

AES Encryption with URL Encoding

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 24 December 2025
 by 
0.0
 (0 ratings)
aes-encryption-with-url-encoding

AES Encryption with URL Encoding

Documentation
1.0.0

Extension Name: AES_Encryption_with_URL_Encoding

Extension Description:

Secure AES-256-CBC encryption and decryption extension with Base64Url encoding for safe transmission in URLs and screens. Uses PBKDF2 key derivation (10,000 iterations) for enhanced security. Each encryption operation includes a random salt and initialization vector (IV) for maximum security. The output is Base64Url encoded, making it safe for use in URLs, query parameters, and screen displays without requiring additional encoding.

Function: EncryptWithEncoding

Description:

Encrypts plain text using AES-256-CBC encryption and encodes the result as Base64Url for URL-safe transmission. The function uses PBKDF2 key derivation to strengthen the encryption key, generates a random salt and initialization vector (IV) for each encryption, and combines them with the encrypted data. The final output is Base64Url encoded, which can be safely used in URLs, query parameters, or displayed on screens without additional encoding.

Parameters:

ssKey (string, input): The encryption key used for AES encryption. This key will be processed through PBKDF2 key derivation with a random salt to generate a secure 32-byte encryption key.

ssPlainText (string, input): The plain text that you want to encrypt. Can contain any UTF-8 text characters.

ssDecodedDecryptedText (string, output): The encrypted and Base64Url-encoded text result. This output is URL-safe and can be directly used in URLs, query parameters, or screens without additional encoding.

Function: DecryptWithDecoding

Description:

Decodes a Base64Url-encoded string and decrypts it using AES-256-CBC decryption to retrieve the original plain text. The function extracts the salt and initialization vector (IV) from the encrypted data, derives the decryption key using PBKDF2 with the provided key and extracted salt, and then decrypts the data to return the original plain text.

Parameters:

sskey (string, input): The same encryption key that was used during encryption. This key must match the original key exactly to successfully decrypt the data.

ssEncryptedText (string, input): The Base64Url-encoded encrypted text that was produced by the MssEncrypt_Encode function. This is the encrypted data that needs to be decrypted.

ssPlainText (string, output): The decrypted and decoded plain text result. This is the original text that was encrypted, restored to its original form.

Technical Details:

Encryption Algorithm: AES-256-CBC (Advanced Encryption Standard with 256-bit key in Cipher Block Chaining mode)

Key Derivation: PBKDF2 (Password-Based Key Derivation Function 2) with 10,000 iterations

Encoding Format: Base64Url (URL-safe Base64 encoding)

Salt Size: 8 bytes (randomly generated for each encryption)

IV Size: 16 bytes (randomly generated for each encryption)

Key Size: 32 bytes (256 bits, derived using PBKDF2)