Skip to main content

file · Command reference

qzx calculateFileHash

What it does

Calculates cryptographic hashes (MD5, SHA-1, SHA-256) of a file

Command maturity: Alpha

Available for real use and feedback while its interface and behavior can still evolve. This is the current development-checkout assessment. Every future immutable release tag preserves the exact assessment shipped by that version. Available in PyPI 0.2.2.0.7a5. This page documents the 0.2.2.0.7a5 alpha development checkout.

Behavior and built-in protections

Inspects without changing state

Direct execution for this operation

Works without invoking native programs

Works without network access

No elevation required by design

This safety classification was reviewed by OpenAI Codex agent against implementation digest sha256:f5db2959aedf2a872c54cb7f46fc561720974e3a1ef951ffea821d796beb12e5 on 2026-08-08.

Exact syntax

qzx calculateFileHash <file_path> [algorithm] --json

Parameters

Swipe or use the horizontal scrollbar to see every column.

NameTypeRequiredDefaultDescription
file_pathstrYesNot declaredPath to the file to hash
algorithmstrNo"sha256"Hash algorithm to use (sha256, sha1, md5)

Input examples

qzx calculateFileHash file.txt

Calculate SHA-256 hash for file.txt

qzx calculateFileHash file.txt md5

Calculate MD5 hash for file.txt

For the complete structured payload, add --json: qzx calculateFileHash <file_path> [algorithm] --json

Observed output example

Captured with QZX 0.2.2.0.7a5 on Windows 11; exit code 0. Host-dependent values and duration can vary.

Example command: qzx calculateFileHash ../artifacts/qzx-evidence/golden-core-files/alpha.txt sha256 --json

{
    "success": true,
    "file_path": "C:\\Team Dropbox\\Valis Idealis\\Ale\\Programacion\\QZX - Quick Zap Exchange\\artifacts\\qzx-evidence\\golden-core-files\\alpha.txt",
    "algorithm": "sha256",
    "hash": "58d32d5e56b4815d6cd4d2ebd18f8ca825804ad4efa2067197dd5e93132e73df",
    "file_size": 33,
    "file_size_readable": "33.00 B",
    "message": "SHA256 hash for '../artifacts/qzx-evidence/golden-core-files/alpha.txt': 58d32d5e56b4815d6cd4d2ebd18f8ca825804ad4efa2067197dd5e93132e73df",
    "meta": {
        "command": "calculateFileHash",
        "command_maturity": {
            "stage": "alpha",
            "label": "Alpha",
            "sequence": 2,
            "public_executable": true,
            "stability": "interface_may_change",
            "summary": "Available for real use and feedback while its interface and behavior can still evolve.",
            "promotion_review_required": false,
            "assessment_scope": "development_checkout"
        },
        "duration_ms": 12.808,
        "schema_version": 1
    }
}
View the JSON result contract
{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "required": [
        "success",
        "message",
        "meta"
    ],
    "properties": {
        "success": {
            "type": "boolean"
        },
        "message": {
            "type": "string"
        },
        "meta": {
            "type": "object",
            "required": [
                "command",
                "command_maturity",
                "duration_ms",
                "schema_version"
            ],
            "properties": {
                "command": {
                    "type": "string"
                },
                "command_maturity": {
                    "type": "object",
                    "required": [
                        "stage",
                        "label",
                        "sequence",
                        "public_executable",
                        "stability",
                        "summary",
                        "promotion_review_required",
                        "assessment_scope"
                    ],
                    "properties": {
                        "stage": {
                            "type": "string"
                        },
                        "label": {
                            "type": "string"
                        },
                        "sequence": {
                            "type": "integer"
                        },
                        "public_executable": {
                            "type": "boolean"
                        },
                        "stability": {
                            "type": "string"
                        },
                        "summary": {
                            "type": "string"
                        },
                        "promotion_review_required": {
                            "type": "boolean"
                        },
                        "assessment_scope": {
                            "type": "string"
                        },
                        "note": {
                            "type": "string"
                        },
                        "review": {
                            "type": "object",
                            "required": [
                                "reviewed_on",
                                "rationale",
                                "evidence"
                            ],
                            "properties": {
                                "reviewed_on": {
                                    "type": "string",
                                    "format": "date"
                                },
                                "rationale": {
                                    "type": "string"
                                },
                                "evidence": {
                                    "type": "array",
                                    "minItems": 1,
                                    "items": {
                                        "type": "string"
                                    }
                                },
                                "replacement": {
                                    "type": "string"
                                }
                            },
                            "additionalProperties": false
                        }
                    },
                    "additionalProperties": true
                },
                "duration_ms": {
                    "type": "number"
                },
                "schema_version": {
                    "type": "integer"
                }
            },
            "additionalProperties": true
        },
        "algorithm": [],
        "error": {
            "type": "string"
        },
        "file_path": [],
        "file_size": [],
        "file_size_readable": [],
        "hash": []
    },
    "additionalProperties": true
}

Errors and limits

The public contract requires success=false and a descriptive message on failure. This catalog does not yet declare a command-specific error taxonomy; inspect the result and do not invent error codes.

QZX is alpha software. Optional dependencies, permissions, and host capabilities can change the result.

{
    "success": false,
    "error": "File '../artifacts/qzx-evidence/golden-core-files/missing.txt' does not exist.",
    "message": "File '../artifacts/qzx-evidence/golden-core-files/missing.txt' does not exist.",
    "meta": {
        "command": "calculateFileHash",
        "command_maturity": {
            "stage": "alpha",
            "label": "Alpha",
            "sequence": 2,
            "public_executable": true,
            "stability": "interface_may_change",
            "summary": "Available for real use and feedback while its interface and behavior can still evolve.",
            "promotion_review_required": false,
            "assessment_scope": "development_checkout"
        },
        "duration_ms": 6.688,
        "schema_version": 1
    }
}

Captured command: qzx calculateFileHash ../artifacts/qzx-evidence/golden-core-files/missing.txt sha256 --json

Evidence workflow: captured and digest-validated.

Evidence and provenance

Documentation channel
Development documentation 0.2.2.0.7a5 · main · sha256:f2555cf1c06a4bb51aacdb4c3cfb8a4dcdaa991d21751f203e889bd3653fcd24
Availability
0.2.2.0.7a5 or earlier

Keep exploring

These commands also belong to the file category. Compare them to choose the operation that best fits your task.

Explore all QZX commands