Overview
This node calculates the cryptographic hash of a binary file provided as input. It supports multiple hashing algorithms, including SHA-384, which is a strong and widely used hash function producing a 384-bit output. The node reads the binary data from a specified input field, computes the hash using the selected algorithm, and outputs the resulting hash string in a designated JSON field.
Common scenarios for this node include verifying file integrity, generating unique identifiers for files, or preparing data for secure storage or transmission. For example, you might use it to generate a SHA-384 hash of an uploaded document to ensure it has not been tampered with or to create a fingerprint for deduplication purposes.
Properties
| Name | Meaning |
|---|---|
| Input Binary Field | The name of the input binary field containing the file data to be hashed (default: "data"). |
| Output Hash Field | The name of the JSON field where the computed hash string will be stored (default: "hash"). |
Output
The node outputs an array of items where each item contains:
- A
jsonobject that includes all original fields plus a new field (name configurable via "Output Hash Field") containing the hexadecimal string representation of the computed hash. - The original
binarydata remains unchanged and is passed through.
No binary output is generated by this node; the output is purely the hash string in JSON format.
Dependencies
- Uses Node.js built-in
cryptomodule to perform hashing operations. - Requires access to the binary data buffer from the input item, which must be available under the specified input binary field.
- No external API keys or services are required.
Troubleshooting
- Missing or incorrect binary field: If the specified input binary field does not exist or contains no data, the node will fail to compute the hash. Ensure the binary property name matches exactly the field containing the file data.
- Unsupported or misspelled hash algorithm: The node only supports predefined algorithms (SHA-256, MD5, SHA-1, SHA-512, SHA-384, RIPEMD160, WHIRLPOOL). Using an unsupported value will cause errors.
- Large files: Processing very large binary files may impact performance or memory usage.
- Error messages typically relate to inability to read binary data or invalid parameters. Verify input data and configuration.