0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions108

Overview

The node provides cryptographic utilities, specifically allowing users to encrypt messages using various encryption algorithms. In the "Crypto" resource with the "Encrypt a Message" operation, it takes a plaintext message and a secret key, then applies the selected cryptographic algorithm to produce an encrypted output.

This node is beneficial in scenarios where sensitive data needs to be securely transformed before storage or transmission, such as encrypting user credentials, confidential messages, or API tokens. For example, you might use this node to encrypt a password before saving it to a database or to secure a message payload before sending it over an insecure channel.

Supported encryption algorithms include AES, DES, TripleDES, Rabbit, RC4, and RC4Drop, giving flexibility depending on security requirements and compatibility.

Properties

Name Meaning
Code Variables Optional collection of code variables defined in the code editor for the selected function. Each variable has a name/ID and a value. Useful for dynamic inputs or referencing variables in custom code contexts.
Message The plaintext message string that you want to encrypt.
Secret Key The secret key string used for encryption. This key must be kept confidential to ensure security.
Crypto Type The encryption algorithm to use. Options are: AES, DES, TripleDES, Rabbit, RC4, RC4Drop.

Output

The node outputs a JSON object containing the result of the encryption operation. Typically, this will include the encrypted ciphertext corresponding to the input message encrypted with the specified algorithm and secret key.

If the node supports binary data output (not explicitly shown here), it would represent the encrypted data in binary form; however, based on the provided code and properties, the output is expected to be JSON with encrypted text.

Dependencies

  • Requires an active connection to the external 0CodeKit API service, authenticated via an API key credential.
  • The node internally calls the 0CodeKit API endpoints corresponding to the "crypto/encrypt" path with the provided parameters.
  • No additional environment variables are explicitly required beyond the API authentication.

Troubleshooting

  • Common Issues:

    • Incorrect or missing secret key: Encryption will fail or produce invalid output if the secret key is not provided or incorrect.
    • Unsupported or misspelled crypto type: Ensure the crypto type matches one of the supported options exactly.
    • Empty or invalid message input: The message to encrypt must be a non-empty string.
    • API connectivity issues: Network problems or invalid API credentials can cause request failures.
  • Error Messages:

    • Errors returned from the API may indicate invalid parameters or authentication failure.
    • Parsing errors if the response is malformed or unexpected.
  • Resolutions:

    • Verify all required fields are correctly filled.
    • Check API key validity and network connectivity.
    • Use valid encryption types and properly formatted messages.
    • Enable "Continue On Fail" option in n8n to handle errors gracefully during batch processing.

Links and References

Discussion