# Encrytion Decryption Toolkit

## Links

- Product page URL: https://www.agentpmt.com/marketplace/encrytion-decryption-toolkit
- Product markdown URL: https://www.agentpmt.com/marketplace/encrytion-decryption-toolkit?format=agent-md
- Product JSON URL: https://www.agentpmt.com/marketplace/encrytion-decryption-toolkit?format=agent-json

## Overview

- Product ID: 695c374f767df5adfd9bc871
- Vendor: Apoth3osis
- Type: core utility
- Unit type: request
- Price: 500 credits
- Categories: Security & Cryptography, Developer Tools, Cryptography, Security Token & Key Generation
- Generated at: 2026-04-15T18:27:02.936Z

### Page Description

This function supports six core actions: generate for creating secure random values in ASCII, BASE64, HEX, or UUID formats with configurable lengths from 4 to 256 characters; hash for computing cryptographic digests using MD5, SHA256, SHA384, SHA512, and SHA3 family algorithms; hmac for generating keyed-hash message authentication codes with a secret key; sign for creating digital signatures using RSA (RS256, RS512) or ECDSA (ES256, ES384, ES512) algorithms with PEM-encoded private keys; and encrypt/decrypt for AES-256-GCM authenticated encryption with support for initialization vectors and optional additional authenticated data. Users can provide input as plain text or base64-encoded binary data, and all cryptographic outputs can be encoded in either hexadecimal or base64 format for flexibility across different system integrations. The toolkit handles the underlying cryptographic complexity while exposing a straightforward interface, making it ideal for agent workflows that require secure token generation, data integrity verification, or sensitive information protection.

### Agent Description

Cryptographic toolkit: generate secure randoms, compute hashes (MD5, SHA, SHA3), create HMACs, sign with RSA/ECDSA, encrypt/decrypt with AES-256-GCM.

## Details Tab

### Details

This function supports six core actions: generate for creating secure random values in ASCII, BASE64, HEX, or UUID formats with configurable lengths from 4 to 256 characters; hash for computing cryptographic digests using MD5, SHA256, SHA384, SHA512, and SHA3 family algorithms; hmac for generating keyed-hash message authentication codes with a secret key; sign for creating digital signatures using RSA (RS256, RS512) or ECDSA (ES256, ES384, ES512) algorithms with PEM-encoded private keys; and encrypt/decrypt for AES-256-GCM authenticated encryption with support for initialization vectors and optional additional authenticated data. Users can provide input as plain text or base64-encoded binary data, and all cryptographic outputs can be encoded in either hexadecimal or base64 format for flexibility across different system integrations. The toolkit handles the underlying cryptographic complexity while exposing a straightforward interface, making it ideal for agent workflows that require secure token generation, data integrity verification, or sensitive information protection.

### Actions

- `generate` (5 credits): Generate a cryptographically secure random value in ASCII, BASE64, HEX, or UUID format.
- `hash` (5 credits): Compute a cryptographic hash of text or binary data using MD5, SHA, or SHA3 algorithms.
- `hmac` (5 credits): Compute a keyed-hash message authentication code (HMAC) using a secret key.
- `sign` (5 credits): Create a digital signature using RSA or ECDSA with a PEM-encoded private key.
- `encrypt` (5 credits): Encrypt plaintext using AES-256-GCM authenticated encryption.
- `decrypt` (5 credits): Decrypt AES-256-GCM ciphertext back to plaintext.

### Use Cases

Generating secure API keys or access tokens for authentication systems, creating unique UUIDs for database record identifiers, computing file checksums to verify data integrity during transfers, validating webhook payloads by computing and comparing HMAC signatures, signing JWT tokens for stateless authentication in API workflows, encrypting sensitive configuration values or credentials before storage, decrypting stored secrets at runtime for secure credential injection, generating session tokens or one-time codes for user verification flows, creating content hashes for deduplication or caching key generation, signing API requests to third-party services that require cryptographic authentication

### Workflows Using This Tool

No public workflows currently reference this product.

### Related Content

No related content is currently linked to this product.

## Advanced Tab

### DynamicMCP

- Setup page URL: https://www.agentpmt.com/dynamic-mcp
- Claude setup guide: https://www.agentpmt.com/dynamic-mcp?platform=claude#videos
- ChatGPT setup guide: https://www.agentpmt.com/dynamic-mcp?platform=chatgpt#videos
- Cursor setup guide: https://www.agentpmt.com/dynamic-mcp?platform=cursor#videos
- Windsurf setup guide: https://www.agentpmt.com/dynamic-mcp?platform=windsurf#videos

STDIO connector for Claude Code, Codex, Cursor, Zed, and other LLMs that require STDIO or custom connections. This lightweight connector routes requests to `https://api.agentpmt.com/mcp`. All tool execution happens in the cloud and the server cannot edit any files on your computer.

```bash
npm install -g @agentpmt/mcp-router
agentpmt-setup
```

### REST API

The live page renders cURL, Python, JavaScript, and Node.js examples. Logged-in users see those examples prefilled with their own API and budget credentials.

- Purchase endpoint: https://api.agentpmt.com/products/purchase
- Authorization format: `Bearer <base64(apiKey:budgetKey)>`

```bash
curl -X POST "https://api.agentpmt.com/products/purchase" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer eW91ci1hcGkta2V5LWhlcmU6eW91ci1idWRnZXQta2V5LWhlcmU=" \
  -d '{
    "product_id": "695c374f767df5adfd9bc871",
    "parameters": {
      "action": "generate",
      "property_name": "example_property_name",
      "generation_type": "ASCII",
      "length": 32
    }
  }'
```

### Autonomous Agents

Do not use the abbreviated instructions in this product markdown for wallet-based invocation. Retrieve the full External Agent API markdown document instead.

- External Agent API page URL: https://www.agentpmt.com/external-agent-api
- External Agent API markdown URL: https://www.agentpmt.com/external-agent-api?format=agent-md

### Schema

#### Parameters

- Schema type: actions

```json
{
  "actions": {
    "generate": {
      "description": "Generate a cryptographically secure random value in ASCII, BASE64, HEX, or UUID format.",
      "properties": {
        "property_name": {
          "type": "string",
          "description": "Name of the property to write the output to.",
          "required": true
        },
        "generation_type": {
          "type": "string",
          "description": "Type of value to generate: ASCII, BASE64, HEX, or UUID.",
          "required": true,
          "enum": [
            "ASCII",
            "BASE64",
            "HEX",
            "UUID"
          ]
        },
        "length": {
          "type": "integer",
          "description": "Length of the generated value (ignored for UUID). Default: 32.",
          "required": false,
          "default": 32,
          "minimum": 4,
          "maximum": 256
        }
      }
    },
    "hash": {
      "description": "Compute a cryptographic hash of text or binary data using MD5, SHA, or SHA3 algorithms.",
      "properties": {
        "hash_algorithm": {
          "type": "string",
          "description": "Hash algorithm to use.",
          "required": true,
          "enum": [
            "MD5",
            "SHA256",
            "SHA384",
            "SHA512",
            "SHA3-256",
            "SHA3-384",
            "SHA3-512"
          ]
        },
        "value": {
          "type": "string",
          "description": "Plain text input to hash. Required unless binary_file is true.",
          "required": false
        },
        "property_name": {
          "type": "string",
          "description": "Output property name. Defaults to hash_result.",
          "required": false
        },
        "encoding": {
          "type": "string",
          "description": "Output encoding format.",
          "required": false,
          "default": "hex",
          "enum": [
            "hex",
            "base64"
          ]
        },
        "binary_file": {
          "type": "boolean",
          "description": "Set to true to hash binary data from binary_value_base64 instead of text.",
          "required": false,
          "default": false
        },
        "binary_value_base64": {
          "type": "string",
          "description": "Base64-encoded binary data to hash. Required when binary_file is true.",
          "required": false
        },
        "binary_property_name": {
          "type": "string",
          "description": "Metadata label for the binary input.",
          "required": false
        }
      }
    },
    "hmac": {
      "description": "Compute a keyed-hash message authentication code (HMAC) using a secret key.",
      "properties": {
        "hash_algorithm": {
          "type": "string",
          "description": "Hash algorithm to use for HMAC.",
          "required": true,
          "enum": [
            "MD5",
            "SHA256",
            "SHA384",
            "SHA512",
            "SHA3-256",
            "SHA3-384",
            "SHA3-512"
          ]
        },
        "secret": {
          "type": "string",
          "description": "Secret key for HMAC computation.",
          "required": true
        },
        "value": {
          "type": "string",
          "description": "Plain text input. Required unless binary_file is true.",
          "required": false
        },
        "property_name": {
          "type": "string",
          "description": "Output property name. Defaults to hmac_result.",
          "required": false
        },
        "encoding": {
          "type": "string",
          "description": "Output encoding format.",
          "required": false,
          "default": "hex",
          "enum": [
            "hex",
            "base64"
          ]
        },
        "binary_file": {
          "type": "boolean",
          "description": "Set to true to use binary data from binary_value_base64.",
          "required": false,
          "default": false
        },
        "binary_value_base64": {
          "type": "string",
          "description": "Base64-encoded binary data. Required when binary_file is true.",
          "required": false
        }
      }
    },
    "sign": {
      "description": "Create a digital signature using RSA or ECDSA with a PEM-encoded private key.",
      "properties": {
        "value": {
          "type": "string",
          "description": "The text data to sign.",
          "required": true
        },
        "algorithm": {
          "type": "string",
          "description": "Signing algorithm to use.",
          "required": true,
          "enum": [
            "RS256",
            "RS512",
            "ES256",
            "ES384",
            "ES512"
          ]
        },
        "private_key": {
          "type": "string",
          "description": "PEM-encoded private key for signing.",
          "required": true
        },
        "property_name": {
          "type": "string",
          "description": "Output property name. Defaults to signature.",
          "required": false
        },
        "encoding": {
          "type": "string",
          "description": "Output encoding format.",
          "required": false,
          "default": "hex",
          "enum": [
            "hex",
            "base64"
          ]
        }
      }
    },
    "encrypt": {
      "description": "Encrypt plaintext using AES-256-GCM authenticated encryption.",
      "properties": {
        "value": {
          "type": "string",
          "description": "Plaintext to encrypt.",
          "required": true
        },
        "key": {
          "type": "string",
          "description": "32-byte AES encryption key, encoded as hex or base64.",
          "required": true
        },
        "iv": {
          "type": "string",
          "description": "12-byte initialization vector/nonce, encoded as hex or base64.",
          "required": true
        },
        "encoding": {
          "type": "string",
          "description": "Encoding for key, iv, and output ciphertext.",
          "required": false,
          "default": "hex",
          "enum": [
            "hex",
            "base64"
          ]
        },
        "aad": {
          "type": "string",
          "description": "Additional authenticated data (verified during decryption but not encrypted).",
          "required": false
        }
      }
    },
    "decrypt": {
      "description": "Decrypt AES-256-GCM ciphertext back to plaintext.",
      "properties": {
        "value": {
          "type": "string",
          "description": "Ciphertext to decrypt (hex or base64 encoded).",
          "required": true
        },
        "key": {
          "type": "string",
          "description": "32-byte AES encryption key (same encoding used during encryption).",
          "required": true
        },
        "iv": {
          "type": "string",
          "description": "12-byte initialization vector/nonce (same value used during encryption).",
          "required": true
        },
        "encoding": {
          "type": "string",
          "description": "Encoding for key, iv, and ciphertext.",
          "required": false,
          "default": "hex",
          "enum": [
            "hex",
            "base64"
          ]
        },
        "aad": {
          "type": "string",
          "description": "Additional authenticated data (must match what was used during encryption).",
          "required": false
        }
      }
    }
  },
  "properties": {}
}
```

### Usage Instructions

# Encryption Decryption Toolkit

Cryptographic utility for generating random values, hashing data, computing HMACs, creating digital signatures, and performing AES-256-GCM encryption/decryption.

---

## Actions

### generate

Generate a cryptographically secure random value.

**Required fields:**
- `generation_type` (string) — Type of value to generate: `ASCII`, `BASE64`, `HEX`, or `UUID`
- `property_name` (string) — Name for the output property containing the generated value

**Optional fields:**
- `length` (integer, 4-256, default 32) — Length of the generated value (ignored for UUID)

**Example — Generate a hex API key:**
```json
{
  "action": "generate",
  "property_name": "api_key",
  "generation_type": "HEX",
  "length": 64
}
```

**Example — Generate a UUID:**
```json
{
  "action": "generate",
  "property_name": "session_id",
  "generation_type": "UUID"
}
```

**Example — Generate a base64 token:**
```json
{
  "action": "generate",
  "property_name": "refresh_token",
  "generation_type": "BASE64",
  "length": 48
}
```

---

### hash

Compute a cryptographic hash of text or binary data.

**Required fields:**
- `hash_algorithm` (string) — Hash algorithm: `MD5`, `SHA256`, `SHA384`, `SHA512`, `SHA3-256`, `SHA3-384`, or `SHA3-512`
- `value` (string) — Text to hash (required unless `binary_file` is true)

**Optional fields:**
- `property_name` (string) — Output property name (defaults to `hash_result`)
- `encoding` (string) — Output encoding: `hex` (default) or `base64`
- `binary_file` (boolean, default false) — Set to true to hash binary data instead of text
- `binary_value_base64` (string) — Base64-encoded binary data (required when `binary_file` is true)
- `binary_property_name` (string) — Metadata label for the binary input

**Example — SHA-256 hash of text:**
```json
{
  "action": "hash",
  "hash_algorithm": "SHA256",
  "value": "hello world"
}
```

**Example — Hash binary data with base64 output:**
```json
{
  "action": "hash",
  "hash_algorithm": "SHA512",
  "binary_file": true,
  "binary_value_base64": "SGVsbG8gV29ybGQ=",
  "encoding": "base64"
}
```

**Example — MD5 hash with custom property name:**
```json
{
  "action": "hash",
  "hash_algorithm": "MD5",
  "value": "check this content",
  "property_name": "content_checksum"
}
```

---

### hmac

Compute a keyed-hash message authentication code.

**Required fields:**
- `hash_algorithm` (string) — Hash algorithm: `MD5`, `SHA256`, `SHA384`, `SHA512`, `SHA3-256`, `SHA3-384`, or `SHA3-512`
- `secret` (string) — The secret key for HMAC computation
- `value` (string) — Text to authenticate (required unless `binary_file` is true)

**Optional fields:**
- `property_name` (string) — Output property name (defaults to `hmac_result`)
- `encoding` (string) — Output encoding: `hex` (default) or `base64`
- `binary_file` (boolean, default false) — Set to true to use binary data as input
- `binary_value_base64` (string) — Base64-encoded binary data (required when `binary_file` is true)

**Example — HMAC-SHA256:**
```json
{
  "action": "hmac",
  "hash_algorithm": "SHA256",
  "value": "message to authenticate",
  "secret": "my-secret-key"
}
```

**Example — HMAC-SHA512 with base64 output:**
```json
{
  "action": "hmac",
  "hash_algorithm": "SHA512",
  "value": "webhook payload content",
  "secret": "webhook-signing-secret",
  "encoding": "base64"
}
```

---

### sign

Create a digital signature using a private key.

**Required fields:**
- `value` (string) — The text to sign
- `algorithm` (string) — Signing algorithm: `RS256`, `RS512` (RSA), or `ES256`, `ES384`, `ES512` (ECDSA)
- `private_key` (string) — PEM-encoded private key

**Optional fields:**
- `property_name` (string) — Output property name (defaults to `signature`)
- `encoding` (string) — Output encoding: `hex` (default) or `base64`

**Example — RSA SHA-256 signature:**
```json
{
  "action": "sign",
  "value": "data to sign",
  "algorithm": "RS256",
  "private_key": "-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----",
  "encoding": "base64"
}
```

**Example — ECDSA signature:**
```json
{
  "action": "sign",
  "value": "data to sign",
  "algorithm": "ES256",
  "private_key": "-----BEGIN EC PRIVATE KEY-----\n...\n-----END EC PRIVATE KEY-----"
}
```

---

### encrypt

Encrypt plaintext using AES-256-GCM authenticated encryption.

**Required fields:**
- `value` (string) — Plaintext to encrypt
- `key` (string) — 32-byte AES key, encoded as hex or base64
- `iv` (string) — 12-byte nonce/initialization vector, encoded as hex or base64

**Optional fields:**
- `encoding` (string) — Encoding for key, iv, and output: `hex` (default) or `base64`
- `aad` (string) — Additional authenticated data (verified during decryption but not encrypted)

**Example — Encrypt with hex-encoded key and IV:**
```json
{
  "action": "encrypt",
  "value": "secret message",
  "key": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
  "iv": "0123456789abcdef01234567"
}
```

**Example — Encrypt with AAD:**
```json
{
  "action": "encrypt",
  "value": "confidential data",
  "key": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
  "iv": "0123456789abcdef01234567",
  "aad": "user-id:12345"
}
```

---

### decrypt

Decrypt AES-256-GCM ciphertext back to plaintext.

**Required fields:**
- `value` (string) — Ciphertext to decrypt (hex or base64 encoded)
- `key` (string) — 32-byte AES key (same encoding used during encryption)
- `iv` (string) — 12-byte nonce (same value used during encryption)

**Optional fields:**
- `encoding` (string) — Encoding for key, iv, and ciphertext: `hex` (default) or `base64`
- `aad` (string) — Additional authenticated data (must match what was used during encryption)

**Example — Decrypt hex-encoded ciphertext:**
```json
{
  "action": "decrypt",
  "value": "a1b2c3d4e5f6...",
  "key": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
  "iv": "0123456789abcdef01234567"
}
```

---

## Common Workflows

### Generate a key, encrypt, then decrypt
1. Use `generate` with `generation_type: "HEX"` and `length: 64` to create a 32-byte key
2. Use `generate` with `generation_type: "HEX"` and `length: 24` to create a 12-byte IV
3. Use `encrypt` with the generated key, IV, and your plaintext
4. Use `decrypt` with the same key, IV, and the returned ciphertext

### Verify data integrity with HMAC
1. Sender computes `hmac` on the message with a shared secret
2. Receiver computes `hmac` on the received message with the same secret
3. Compare the two HMAC values — if they match, the message is authentic and unaltered

### Hash a file for checksums
1. Base64-encode the file contents
2. Use `hash` with `binary_file: true` and `binary_value_base64` set to the encoded content

---

## Important Notes

- **Encoding consistency**: The `encoding` parameter applies to both input decoding (key, iv, ciphertext) and output encoding. Use the same encoding for encrypt and decrypt operations.
- **Key sizes**: AES-256-GCM requires exactly a 32-byte key (64 hex characters or 44 base64 characters).
- **IV/nonce**: Must be 12 bytes (24 hex characters). Never reuse an IV with the same key.
- **Hash algorithms**: SHA384 is supported directly (legacy SHA385 alias also accepted internally).
- **UUID generation**: The `length` parameter is ignored when generation_type is UUID; standard UUIDs are always returned.
- **property_name**: Controls the key name in the response JSON where the result appears. Useful for chaining outputs in workflows.

### About The Developer

- Vendor name: Apoth3osis
- Website: apoth3osis.io

We build tools that enable AI agents to excel in the mathematical realm.

Our small team develops experimental and unique solutions in the AI arena, with a strong focus on modular computing for agentic applications and custom model deployment. We have handled projects for a variety of applications across many sectors, from algorithmic trading and financial analysis, to molecular simulations and predictions, to habitat and biodiversity monitoring and wildlife conservation.

### Frequently Asked Questions

No linked FAQs are currently available.

### Dependencies

This product has no public dependency products.