Directus (flagbit) icon

Directus (flagbit)

Consume Directus API

Utility → Verifiy Hash

AI-generated

Overview

This node operation verifies whether a given source string matches a specified hash. It is useful in scenarios where you need to confirm the integrity or authenticity of data by comparing its hash value. For example, it can be used to verify passwords, check file integrity, or validate data received from external sources.

Use Case Examples

  1. Verifying a password input against a stored hash to authenticate a user.
  2. Checking if a downloaded file's hash matches the expected hash to ensure it was not tampered with.

Properties

Name Meaning
String The source string that you want to verify against the hash.
Hash The hash value you want to verify the source string against.

Output

JSON

  • isValid - Boolean indicating if the source string matches the hash (true if valid, false otherwise)

Troubleshooting

  • Ensure that the input string and hash are correctly formatted and not empty, as invalid inputs will cause verification to fail.
  • If the hash algorithm used to generate the hash is not supported or mismatched, verification will fail. Confirm the hash type matches the expected algorithm.

Discussion