0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Crypto → Encrypt a Message

AI-generated

Overview

The Crypto - Encrypt a Message operation in this custom n8n node allows you to encrypt a plaintext message using a selected cryptographic algorithm and a secret key. This is useful for securely transmitting sensitive information, storing confidential data, or integrating encryption into automated workflows.

Practical examples:

  • Encrypting user credentials before saving them to a database.
  • Securing API tokens or secrets before sending them to third-party services.
  • Automating the encryption of messages or files before sharing via email or cloud storage.

Properties

Name Meaning
Message The plaintext message you want to encrypt. This is the input that will be transformed into an encrypted format.
Secret Key The secret key used for encryption. This must be kept secure, as it is required to decrypt the message later.
Crypto Type The encryption algorithm to use. Options: AES, DES, TripleDES, Rabbit, RC4, RC4Drop. Each offers different levels of security and compatibility depending on your requirements.

Output

The output will be a JSON object containing the result of the encryption operation. Typically, this includes:

{
  "result": "<encrypted_message>"
}
  • result: The encrypted version of the input message, encoded as a string (often base64 or hexadecimal, depending on the backend implementation).

Dependencies

  • External Service: Requires access to the CodeKit API (as indicated by the need for codeKitApi credentials).
  • n8n Configuration: You must configure the codeKitApi credential in your n8n instance with the appropriate API key or authentication details.

Troubleshooting

Common Issues:

  • Invalid Secret Key: If the secret key does not meet the requirements of the chosen crypto type (e.g., length), encryption may fail.
  • Unsupported Characters: Some algorithms may have issues with certain characters in the message or key.
  • Missing Credentials: If the codeKitApi credential is not set up, the node will throw an authentication error.

Error Messages:

  • "error": "Error: <description>" — This appears in the output if an error occurs and "Continue On Fail" is enabled. Check the error description for details such as invalid parameters or missing credentials.

How to resolve:

  • Double-check that all required properties are filled.
  • Ensure the secret key matches the requirements for the selected algorithm.
  • Verify that the codeKitApi credential is correctly configured in n8n.

Links and References

Discussion