360 Secure SkillHub
360 安全技能中心

file-hasher

该 Skill 通过 Bash 脚本为单个文件计算 SHA-256、SHA-1 或 MD5 校验和,也可一次输出三种算法结果,并用预期哈希值与指定算法校验文件完整性,返回匹配结果或退出码。

terrycarter1985
terrycarter1985
热度 28.01
最近更新 2026-08-16 11:50:02
分类:效率依赖:代码执行 / 读写文件应用场景:数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add terrycarter1985/file-hasher
Metadata
name
file-hasher
description
Compute file checksums (MD5, SHA-1, SHA-256) and verify file integrity. Use when you need to verify file integrity, detect duplicates, or generate hash identifiers for digital assets.
metadata
{"openclaw":{"emoji":"🔐"}}

File Hasher

Quickly compute and verify file hashes. Supports MD5, SHA-1, and SHA-256.

Prerequisites

  • sha256sum, sha1sum, md5sum available on PATH (standard on Linux/macOS)

Usage

Compute a single hash

bash scripts/hash.sh <file> [algorithm]
  • algorithm: sha256 (default), sha1, or md5

Compute all algorithms at once

bash scripts/hash-all.sh <file>

Verify a hash

bash scripts/verify.sh <file> <expected-hash> [algorithm]

Exit code 0 = match, 1 = mismatch.

Examples

# SHA-256 of a file
bash scripts/hash.sh ./photo.jpg sha256

# All hashes
bash scripts/hash-all.sh ./document.pdf

# Verify MD5
bash scripts/verify.sh ./data.zip abc123def456 md5