4Jawaly Actions

4Jawaly utility actions and helpers

Hash Text

AI-generated

Overview

This node performs various utility actions including hashing text using different algorithms such as MD5, SHA-1, SHA-256, and SHA-512. It is useful for generating cryptographic hashes of input text, which can be applied in scenarios like password hashing, data integrity verification, and digital signatures.

Use Case Examples

  1. Hashing a password string to store securely in a database.
  2. Generating a SHA-256 hash of a message to verify its integrity.
  3. Creating a unique identifier by hashing text data.

Properties

Name Meaning
Hash Algorithm The cryptographic hash algorithm to use for generating the hash of the input text.
Text to Hash The input text string that will be hashed using the selected algorithm.

Output

JSON

  • success - Indicates if the hashing operation was successful.
  • operation - The operation performed, which is 'hashText'.
  • algorithm - The hash algorithm used for generating the hash.
  • original_text - The original input text that was hashed.
  • hash - The resulting hash string in hexadecimal format.
  • hash_length - The length of the generated hash string.

Dependencies

  • Node.js 'crypto' module for hashing functionality

Troubleshooting

  • Error 'Text to hash is required' occurs if the input text is empty or missing. Ensure the 'Text to Hash' property is provided.
  • Errors related to unsupported or invalid hash algorithms may occur if an unsupported algorithm is selected. Use one of the supported algorithms: MD5, SHA-1, SHA-256, SHA-512.
  • If the node throws 'Failed to generate hash' error, check that the input text is valid and the crypto module is functioning properly.

Discussion