<!-- BusyBot node reference — https://busybot.net/tools/crypto-binary/ -->

> Node: Crypto Binary (`crypto_binary`) · Action (binary) · v1
> Category: Core Nodes · Credentials: none
> Updated: 2026-08-16

# Crypto Binary

> Hash binary data using MD5, SHA256, SHA512, or other algorithms

## Overview

The Crypto Binary tool reads binary data from an input item and computes a cryptographic hash digest. It supports MD5, SHA1, SHA256, SHA384, and SHA512 algorithms with hex, base64, or binary output encoding. The hash result is written to a configurable JSON property on the output item. The original binary data is forwarded unchanged. No external dependencies or API calls.

**Category:** Core Nodes  
**Tool Name:** `crypto_binary`  
**Version:** 1

**Appearance:** Icon: `lucide-Lock` | Color: `#408000`

## Node Type

**Action (Binary)** — handles file/binary data operations

## Input / Output

| Direction | Port(s) |
|-----------|--------|
| Input | `Input` |
| Output | `Output`, `Error` |

## Credentials

This tool does not require any credentials.

### Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Algorithm | `options` | No | `sha256` | The hash algorithm to use. |
| | | | | Options: `md5` (128-bit, fast, not collision-resistant), `sha1` (160-bit, legacy, not recommended for security), `sha256` (256-bit, recommended general-purpose), `sha384` (384-bit), `sha512` (512-bit, strongest) |
| Encoding | `options` | No | `hex` | The output encoding for the hash digest. |
| | | | | Options: `hex` (hexadecimal string, e.g. "a1b2c3…"), `base64`, `binary` (latin1-encoded string) |
| Binary Property | `string` | Yes | `data` | Name of the binary property containing the file data to hash. Names are case-sensitive — see the upstream node's Binary Data panel for the exact names to use. |
| Output Property Name | `string` | Yes | `hash` | Name of the JSON property to write the hash result to. Supports dot notation (e.g., "meta.hash"). |
| Max Concurrency | `number` | No | `10` | Maximum number of items to process concurrently. |

## Output Data

One output item per input item. The item JSON passes through unchanged and the original binary data is forwarded untouched — the node only adds the digest, as a string, at **Output Property Name**.

```json
{
  "fileName": "contract.pdf",
  "hash": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
}
```

A dotted **Output Property Name** creates the nesting it needs, so `meta.hash` produces:

```json
{
  "fileName": "contract.pdf",
  "meta": {
    "hash": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
  }
}
```

Reference the digest downstream by expression, e.g. `{{ $json.hash }}`. An item that has no binary data on **Binary Property** fails rather than producing an empty digest, so the value is always a real hash of real bytes.

## Usage Examples

- Compute SHA256 hash of an uploaded file
- Generate MD5 checksum for binary data integrity verification
- Hash a PDF document with SHA512 and output as base64
- Calculate file fingerprint for deduplication

## Example Configuration

Hash the `data` binary property with SHA-256 and write a hex digest to `hash`:

```json
{
  "type": "crypto_binary",
  "parameters": {
    "algorithm": "sha256",
    "encoding": "hex",
    "binaryPropertyName": "data",
    "propertyName": "hash",
    "maxConcurrency": 10
  }
}
```

Fingerprint an attachment with SHA-512 as base64, nested under `meta`:

```json
{
  "type": "crypto_binary",
  "parameters": {
    "algorithm": "sha512",
    "encoding": "base64",
    "binaryPropertyName": "attachment",
    "propertyName": "meta.fingerprint"
  }
}
```

### Error Handling

| Mode | Behavior |
|------|----------|
| **stop** | Halts workflow on first error |
| **continue** | Skips failed items, passes successful ones through |
| **errorPort** | Routes failed items to Error output port |

## Tips

Compute a cryptographic hash (MD5, SHA256, SHA512, etc.) of binary file data and output the digest as a JSON property.

### Choosing an algorithm

- Use `sha256` unless you have a reason not to — it is the general-purpose default.
- Use `md5` or `sha1` only for deduplication and change detection against non-hostile data; neither is suitable as a security guarantee.
- Use `sha512` when you want the strongest available digest and file size is not a concern.

### Notes

- The digest covers the file bytes only. Renaming a file, or changing the JSON around it, does not change the hash — which is what makes this node useful for deduplication.
- `binary` encoding produces a latin1 string, not a binary property. Every encoding writes a string into JSON; the node never emits a new file.
- To hash a string rather than a file, use the Crypto node instead.