Directus (denkhaus) icon

Directus (denkhaus)

Consume Directus API

Overview

The "Generate Hash" operation under the "Utility" resource is designed to create a hash value from a given input string. This node is useful in scenarios where you need to securely store, compare, or verify data without exposing the original content. Common use cases include password hashing, data integrity checks, and generating unique identifiers for records.

Practical examples:

  • Hashing user passwords before storing them in a database.
  • Creating a checksum for files or text to detect changes.
  • Generating unique keys for deduplication or caching purposes.

Properties

Name Meaning
String String to hash. The text input that will be converted into a hash value.

Output

The output contains a JSON field with the generated hash value. The structure typically looks like:

{
  "hash": "<generated_hash_value>"
}
  • hash: The resulting hash string derived from the input.

Dependencies

  • No external services or API keys are required for this operation.
  • The node works entirely within n8n and does not require additional configuration.

Troubleshooting

Common issues:

  • Empty Input: If the "String" property is left empty, the node may return an error or an empty hash. Ensure you provide a valid string.
  • Unsupported Characters: Some hashing algorithms may not handle certain special characters as expected. Make sure your input is properly encoded if necessary.

Error messages and resolutions:

  • "String to hash is required" – Ensure the "String" property is filled in.
  • "Invalid input type" – Only plain text strings are supported; avoid passing objects or arrays.

Links and References

Discussion