360 Secure SkillHub
360 安全技能中心

text-hasher

该 Skill 提供在终端内对文本字符串计算 SHA-256 或 MD5 哈希的步骤,支持内联文本、标准输入和用 diff 比较两个哈希,适合快速完整性校验、去重和内容指纹。依赖常见的 sha256sum/md5sum 等命令行工具,不涉及网络。

terrycarter1985
terrycarter1985
热度 15.97
最近更新 2026-08-23 01:19:09
分类:效率依赖:代码执行应用场景:数据处理 / 自动化脚本

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add text-hasher
Metadata
name
text-hasher
description
Compute SHA-256 or MD5 hashes of text strings. Useful for quick integrity checks, deduplication, and content fingerprinting without leaving the terminal.
metadata
{"openclaw":{"emoji":"🔢"}}

Text Hasher Skill

Quickly hash a text string with SHA-256 or MD5.

When to Use

  • Verify content integrity after a copy/paste or download
  • Generate a fingerprint for deduplication
  • Confirm two pieces of text are identical

Prerequisites

  • sha256sum or md5sum (usually preinstalled on Linux/macOS)

Steps

  1. Hash text inline:
    echo -n "your text here" | sha256sum | awk '{print $1}'
    
  2. Or MD5:
    echo -n "your text here" | md5sum | awk '{print $1}'
    
  3. Compare two hashes with diff:
    diff <(echo -n "text A" | sha256sum) <(echo -n "text B" | sha256sum)
    
  4. Hash from stdin (pipe-friendly):
    cat data.txt | sha256sum | awk '{print $1}'
    

Notes

  • -n on echo prevents a trailing newline from changing the hash.
  • For large files use sha256sum filename directly.