Text

AES Decrypt

0calls
Free

Received ciphertext encrypted with AES? Give it to us along with the key and nonce, and we'll restore the original content.

POST
uapis.cn
/api/v1/text/aes/decrypt
Body
key
string
required

Key, length must be 16, 24, or 32 bytes, corresponding to AES-128/192/256.

text
string
required

Base64-encoded ciphertext.

nonce
string

16-byte IV/Nonce, must be exactly 16 characters

Overview

This is a standard AES decryption endpoint. You need to provide Base64-encoded ciphertext, the key used for encryption, and nonce (random number, usually a 16-byte string).

Important

About Key key We support AES-128, AES-192, and AES-256. Please ensure the length (in bytes) of the key key you provide is exactly 16, 24, or 32, corresponding to these three encryption strengths.

About Nonce nonce Usually a 16-byte string, must match the one used during encryption.

Request body

key
stringrequired

Key, length must be 16, 24, or 32 bytes, corresponding to AES-128/192/256.

text
stringrequired

Base64-encoded ciphertext.

nonce
stringoptional

16-byte IV/Nonce, must be exactly 16 characters

Response

200 / OK

Successful response

JSON
{
  "plaintext": "top secret message"
}

400 / Bad Request

Invalid request parameters

JSON
{
  "code": "INVALID_ARGUMENT",
  "details": {},
  "message": "Invalid key length, invalid Base64 text, or missing nonce."
}

500 / Internal Server Error

Decryption failed

JSON
{
  "code": "DECRYPTION_FAILED",
  "details": {},
  "message": "Decryption failed, likely due to an incorrect key, nonce, or corrupted ciphertext."
}