aes_encrypt
Encrypt text with AES using a hex-encoded key, supporting CBC and GCM modes for data protection.
Instructions
Encrypt data using AES.
Args: key: Hex-encoded AES key (16, 24, or 32 bytes). data: String to encrypt. mode: Encryption mode - 'CBC' or 'GCM' (default CBC).
Returns: Dictionary with 'ciphertext' (hex) and 'iv' (hex).
Raises: ValueError: If key size is invalid.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"key": "<key>",
"data": "<data>"
},
"name": "aes_encrypt"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| data | Yes | ||
| mode | No | CBC |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||