Docs/Security Utils/GET /v1/aes-encrypt

GET /v1/aes-encryptAES-GCM encrypt

Security Utils lf-security-utils

Scrambles a message so that only someone holding the secret key can read it again. Encrypts plaintext using AES-256-GCM with a random 12-byte IV. Returns ciphertext, IV, and authentication tag.

Query Parameters

ParameterTypeRequiredDescription
inputstringYesPlaintext to encrypt
keystringYesAES-256 key as 64-char hex
aadstringNoAdditional Authenticated Data
encodingstringNoOutput encoding (hex/base64)

Response Schema

success (boolean): Operation success
algorithm (string): AES-256-GCM
ciphertext (string): Encrypted output
iv (string): Generated IV
tag (string): Authentication tag
ciphertext_length (integer): Length in bytes

cURL Example

curl 'https://lf-security-utils.laminarforge.dev/v1/aes-encrypt?input=<input>&key=<key>' -H 'Authorization: Bearer lf_YourApiKey'

Python Example

import requests
url = 'https://lf-security-utils.laminarforge.dev/v1/aes-encrypt'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
params = {'input': '<input>', 'key': '<key>'}
response = requests.get(url, headers=headers, params=params)
print(response.json())