Description
n8n-nodes-argon2
A n8n community node package for Argon2 hashing and verification.
Now includes two separate nodes for better workflow clarity:
- Argon2 Encrypt: Hash (encrypt) a string using Argon2id.
- Argon2 Verify: Verify a string against an Argon2 hash, with two outputs: true and false.
Features
-
Argon2 Encrypt Node
- Input: Plain text (
Text) - Output:
{ "hash": "..." }(single output)
- Input: Plain text (
-
Argon2 Verify Node
- Inputs:
TextandHash - Output branches:
- true: If the verification is successful (
{ "match": true }) - false: If the verification fails or errors (
{ "match": false }or{ "match": false, "error": "..." })
- true: If the verification is successful (
- Inputs:
Installation
Using n8n Community Nodes (Recommended)
- Go to Settings → Community Nodes in your n8n instance.
- Click Install and search for
n8n-nodes-argon2. - Install and restart n8n if required.
Manual (Development)
npm install n8n-nodes-argon2
Usage
Argon2 Encrypt
- Add the Argon2 Encrypt node to your workflow.
- Provide the
Textto hash. - The output will be:
{ "hash": "$argon2id$..." }
Argon2 Verify
- Add the Argon2 Verify node to your workflow.
- Provide the
Textand theHashto check. - The node will route the result:
- If the verification is successful, the output will be sent by the true output:
{ "match": true } - If the verification fails or there is an error, the output will be sent by the false output:
{ "match": false } { "match": false, "error": "<error message>" }
- If the verification is successful, the output will be sent by the true output:
Example
Encrypt
- Input:
mySecretPassword - Output:
{ "hash": "$argon2id$v=19$m=4096,t=3,p=1$..." }
Verify
- Input:
mySecretPassword,$argon2id$v=19$m=4096,t=3,p=1$... - Output (true branch):
{ "match": true } - Input:
wrongPassword,$argon2id$v=19$m=4096,t=3,p=1$... - Output (false branch):
{ "match": false }
Development
- Clone this repo.
- Run
npm install. - Run
npm run buildto compile TypeScript. - Publish to npm with
npm publish --access public.
Contributing
Contributions, issues and feature requests are welcome!
Feel free to open an issue or submit a pull request.
License
MIT