npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-encryption

v1.0.0

Published

n8n node for encrypting and decrypting strings using AES-256-GCM

Downloads

8

Readme

n8n-nodes-encryption

A secure, fast, and reliable n8n node for encrypting and decrypting strings using AES-256-GCM.

Features

  • AES-256-GCM Encryption: Industry-standard authenticated encryption
  • Fast: Hardware-accelerated on modern CPUs
  • Secure: 256-bit encryption with authentication tags to prevent tampering
  • Secret Generation: Generate cryptographically secure keys
  • Flexible: Use credentials or expressions for the secret key

Security

This node uses:

  • AES-256-GCM: Authenticated encryption that ensures both confidentiality and integrity
  • PBKDF2: Key derivation with 100,000 iterations for password-based keys
  • Random IV: Each encryption uses a unique 12-byte initialization vector
  • 16-byte Auth Tag: Detects any tampering with the encrypted data

Operations

1. Generate Secret

Generate a cryptographically secure 256-bit secret key.

Output formats:

  • Hex: 64 characters (default)
  • Base64: 44 characters

2. Encrypt

Encrypt multiple fields at once using AES-256-GCM. Works like the Set node - add as many fields as you need!

Inputs:

  • Secret Source: Choose between credentials or expression
  • Fields to Encrypt: Add multiple field mappings
    • Input Value: The value to encrypt (use expressions like {{ $json.email }})
    • Output Field Name: Name for the encrypted output field

Output: Base64-encoded encrypted data containing salt, IV, auth tag, and ciphertext.

3. Decrypt

Decrypt multiple encrypted fields at once.

Inputs:

  • Secret Source: Choose between credentials or expression
  • Fields to Decrypt: Add multiple field mappings
    • Encrypted Value: The encrypted value (use expressions like {{ $json.encryptedEmail }})
    • Output Field Name: Name for the decrypted output field

Output: Original plaintext for each field

Multi-Field Example

Encrypt email and phone in a single node:

  1. Add field: {{ $json.email }}encryptedEmail
  2. Add field: {{ $json.phone }}encryptedPhone
  3. Add field: {{ $json.ssn }}encryptedSSN

All three fields are encrypted with the same key in one operation.

Installation

In n8n

  1. Go to Settings > Community Nodes
  2. Select Install
  3. Enter n8n-nodes-encryption
  4. Click Install

Manual Installation

# In your n8n installation directory
npm install n8n-nodes-encryption

Development

# Clone the repository
git clone <repo-url>
cd n8n-encrypt

# Install dependencies
npm install

# Build the node
npm run build

# Link to n8n for development
npm link
cd ~/.n8n/nodes
npm link n8n-nodes-encryption

Usage Example

Encrypting an Email Before Sending to AI

  1. Generate Secret (one time):

    • Add Encryption node
    • Select "Generate Secret" operation
    • Run to get your secret key
    • Store the secret in credentials
  2. Encrypt Sensitive Data:

    • Add Encryption node before your AI agent
    • Select "Encrypt" operation
    • Use credentials for the secret
    • Input: {{ $json.email }}
    • Output: encrypted field with encrypted email
  3. Decrypt Response:

    • Add Encryption node after your AI agent
    • Select "Decrypt" operation
    • Use the same credentials
    • Input: {{ $json.encrypted }}
    • Output: decrypted field with original email

Best Practices

  1. Store secrets securely: Use n8n credentials, never hardcode secrets
  2. Same secret for encrypt/decrypt: Use the same secret key for both operations
  3. Backup your secrets: Encrypted data cannot be recovered without the secret
  4. Use credentials mode: Preferred over expression mode for better security

Technical Details

  • Algorithm: AES-256-GCM
  • Key Length: 256 bits (32 bytes)
  • IV Length: 96 bits (12 bytes) - NIST recommended for GCM
  • Auth Tag: 128 bits (16 bytes)
  • Key Derivation: PBKDF2-SHA256 with 100,000 iterations
  • Salt Length: 128 bits (16 bytes)

License

MIT