节点与集成

Crypto

Use the Crypto node to perform cryptographic operations in workflows.

Actions

Node parameters

Node parameters depend on the action you select.

The Hmac, Sign, Encrypt, and Decrypt actions need Crypto credentials. Each action uses the credential field it needs:

  • Hmac uses the Hmac Secret.
  • Sign uses the Private Key.
  • Encrypt and Decrypt use the Encryption Passphrase for symmetric mode, or the Encryption Public Key and Encryption Private Key for asymmetric mode.

Decrypt parameters

  • Mode: Select the mode to use. This must match the mode used to encrypt the value. Choose from:
  • Symmetric (Passphrase): Decrypt with a passphrase using an authenticated cipher.
  • Asymmetric (RSA): Decrypt with an RSA private key.
  • Cipher: When you select Symmetric (Passphrase), choose the authenticated cipher to use. This must match the cipher used to encrypt the value. Choose from:
  • AES-256-GCM
  • AES-192-GCM
  • AES-128-GCM
  • ChaCha20-Poly1305
  • Value: Enter the base64 string produced by the Encrypt action.
  • Property Name: Enter the name of the property you want to write the decrypted value to.

Encrypt parameters

  • Mode: Select the mode to use. Choose from:
  • Symmetric (Passphrase): Encrypt with a passphrase using an authenticated cipher.
  • Asymmetric (RSA): Encrypt with an RSA public key.
  • Cipher: When you select Symmetric (Passphrase), choose the authenticated cipher to use. You must select the same cipher when you decrypt the value. Choose from:
  • AES-256-GCM
  • AES-192-GCM
  • AES-128-GCM
  • ChaCha20-Poly1305
  • Value: Enter the value you want to encrypt.
  • Property Name: Enter the name of the property you want to write the encrypted value to. The node writes the result as a base64 string.

Generate parameters

  • Property Name: Enter the name of the property to write the random string to.
  • Type: Select the encoding type to use to generate the string. Choose from:
  • ASCII
  • BASE64
  • HEX
  • UUID
  • Length: When you select ASCII, BASE64, or HEX, enter the length of the generated string. The default is 32.

Hash parameters

  • Type: Select the hash type to use. Choose from:
  • MD5
  • SHA256
  • SHA3-256
  • SHA3-384
  • SHA3-512
  • SHA384
  • SHA512
  • Binary File: Turn this parameter on if the data you want to hash is from a binary file.
  • Value: If you turn off Binary File, enter the value you want to hash.
  • Binary Property Name: If you turn on Binary File, enter the name of the binary property that contains the data you want to hash.
  • Property Name: Enter the name of the property you want to write the hash to.
  • Encoding: Select the encoding type to use. Choose from:
  • BASE64
  • HEX

Hmac parameters

  • Binary File: Turn this parameter on if the data you want to create an Hmac for is from a binary file.
  • Value: If you turn off Binary File, enter the value you want to create an Hmac for.
  • Binary Property Name: If you turn on Binary File, enter the name of the binary property that contains the data you want to create an Hmac for.
  • Type: Select the hash type to use. Choose from:
  • MD5
  • SHA256
  • SHA3-256
  • SHA3-384
  • SHA3-512
  • SHA384
  • SHA512
  • Property Name: Enter the name of the property you want to write the Hmac to.
  • Encoding: Select the encoding type to use. Choose from:
  • BASE64
  • HEX

This action uses the Hmac Secret from your Crypto credentials.

Sign parameters

  • Value: Enter the value you want to sign.
  • Property Name: Enter the name of the property you want to write the signed value to.
  • Algorithm Name or ID: Choose an algorithm name from the list or specify an ID using an expression.
  • Encoding: Select the encoding type to use. Choose from:
  • BASE64
  • HEX

This action uses the Private Key from your Crypto credentials.

Templates and examples

Browse Crypto integration templates or search all templates

官方原文和授权

本页来自 N8N 英文官方网站固定快照,并转换成 xueai 静态页面。内容以 N8N 持续更新的官方页面为准。

来源、授权与修改

本站保留许可证、固定提交号、社区作者和修改说明,不代表 n8n 对本站背书。

查看许可证查看来源和修改说明