0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions114

Crypto → Hash a Text

AI-generated

Overview

This node performs cryptographic hashing of a given text message using a specified hash algorithm and a secret key. It is useful for scenarios where you need to securely hash sensitive information, such as passwords or tokens, or to generate message authentication codes (HMAC) for data integrity verification. For example, you can hash a user's password before storing it or create an HMAC to verify the authenticity of a message.

Use Case Examples

  1. Hash a password using SHA256 before storing it in a database.
  2. Generate an HMAC using HmacSHA256 to verify message integrity in API communication.

Properties

Name Meaning
Code Variables Allows adding multiple code variables with names or IDs and their corresponding values, which can be used in the code editor for the selected function.
Message The text message that you want to hash.
Secret Key The secret key used in the hashing process, especially for HMAC algorithms.
Hash Type The type of hash algorithm to use for hashing the message. Options include MD5, SHA1, SHA3, SHA224, SHA256, SHA384, SHA512, RIPEMD160, and their HMAC variants.

Output

JSON

  • hash - The resulting hash string of the input message using the specified hash type and secret key.

Dependencies

  • An API key credential for the CodeKit service is required to authenticate requests.

Troubleshooting

  • Ensure the 'Message' and 'Secret Key' fields are not empty, as they are required for hashing.
  • Verify that the selected 'Hash Type' is supported and correctly spelled.
  • If the node throws an error related to API authentication, check that the API key credential is correctly configured and valid.
  • If the output is not as expected, confirm that the input message and secret key are correctly provided and that the hash type matches the intended algorithm.

Discussion