# 使用 Homebrew, apk, apt, Nix 安装 hashcash

查看 hashcash 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:hashcash
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install hashcash
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add hashcash
```

  证据: Alpine Linux edge package indexes: hashcash from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install hashcash
```

  证据: Debian stable package indexes: hashcash from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#hashcash
```

  证据: nixpkgs package indexes: pkgs/by-name/ha/hashcash/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:hashcash
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/hashcash>
- **版本:** 1.22
- **来源摘要:** Proof-of-work algorithm to counter denial-of-service (DoS) attacks
- **主页:** <http://hashcash.org>
- **上游文档:** <http://www.hashcash.org/docs/hashcash.html>
- **许可证:** LicenseRef-Homebrew-public-domain OR BSD-3-Clause OR LGPL-2.1-only OR GPL-2.0-only
- **源码归档:** <https://deb.debian.org/debian/pool/main/h/hashcash/hashcash_1.22.orig.tar.gz>
- **最后更新:** 2026-06-22T14:03:42-07:00
- **已生成:** 2026-07-08T18:08:21+00:00

## 可执行文件

- hashcash (cli)
- sha1 (cli)
- hashcash (别名)
- sha1 (别名)

## 依赖

- openssl@4

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 1.22
- 管理器更新时间: 2026-06-22
- 本地数据: OK
- 上游仓库: http://hashcash.org
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

Hashcash is Adam Back's proof-of-work scheme for making a sender spend CPU time before a receiver accepts a message or request. The Homebrew package installs the command-line tool that mints and verifies Hashcash stamps, but the package is historically important because the algorithm became one of the canonical proof-of-work designs referenced by later anti-abuse and cryptocurrency systems.

### 项目历史

Hashcash was invented by Adam Back in 1997 as a denial-of-service and anti-spam countermeasure. The basic idea was to attach a stamp to a message; the sender expends adjustable computational work to mint the stamp, while the recipient can verify it cheaply. The official site describes both the algorithm and the email tool as `hashcash`, which is why the package combines a security idea with a concrete Unix-style command.

The command-line documentation presents the package as a tool for minting stamps, checking stamps, estimating work, purging spent-stamp databases, counting partial preimage bits, and extracting resource names. The implementation used SHA1 partial preimages for version-1 stamps, with an adjustable bit target and a receiver-side database option for double-spend protection.

### 采用历史

Hashcash's first adoption story was email anti-spam: senders could attach X-Hashcash headers and receivers could treat valid stamps as a whitelisting signal. The official docs describe a default email validity window and a database of spent stamps to stop reuse.

The larger adoption story came later through Bitcoin. Hashcash.org explicitly describes Hashcash as the mining function used in Bitcoin, while also explaining the differences: Bitcoin uses SHA-256 rather than SHA1, double hashing, and a more finely adjusted network difficulty. That made Hashcash a bridge between cypherpunk anti-spam tools and package-manager-visible cryptocurrency infrastructure.

### 使用方式

The `hashcash` executable can mint stamps with `-m`, check them with `-c`, estimate work with `-s`, purge spent-stamp databases with `-p`, and count proof bits with `-w`. In email use, the resource is typically a recipient address, and the stamp can be placed in an X-Hashcash header.

The package is also useful as a reference implementation. The official site notes that the algorithm is simple enough to implement from scratch with a hash library and that verification can be understood as counting leading zero bits in a hash output.

### 为什么软件包爱好者会关心

Hashcash is one of those packages whose code footprint is much smaller than its historical footprint. It is a command-line tool for an old anti-spam mechanism, but it also preserves a concrete implementation of proof-of-work in the Unix package ecosystem.

For package nerds, Hashcash matters because it connects mail-era anti-abuse tooling, command-line cryptographic utilities, source tarballs rather than modern hosted repos, and the intellectual lineage of Bitcoin mining. Its Homebrew formula keeps a small historical security tool installable long after its original email-spam use case stopped being mainstream.

### 时间线

- 1997: Adam Back invents Hashcash as a proof-of-work anti-spam and denial-of-service countermeasure.
- 2002: The Hashcash denial-of-service countermeasure paper is published as a technical report.
- 2004: Hashcash 1.02 code and the version-1 stamp format are described in the official developer notes and man page.
- 2009: Bitcoin launches using a Hashcash-style proof-of-work mining function with SHA-256 and network difficulty adjustment.
- 2013: Hashcash.org's Bitcoin notes compare Bitcoin difficulty with Hashcash bit difficulty and explain the conceptual relationship.

### Related projects

- Bitcoin uses a Hashcash-style mining function with SHA-256 and dynamic difficulty.
- RPOW is discussed by Hashcash.org as an earlier reusable proof-of-work system in the same design family.
- Email anti-spam systems and X-Hashcash headers are the original deployment target for the command-line tool.

### 来源

- Official Hashcash home page, man page, developer notes, source page, and Bitcoin comparison page.


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** hashcash
- **Version Scheme:** 0
- **Revision:** 2
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## 其他软件包管理器记录

- Debian apt - hashcash - 1.22-2: normalized package name match | Debian stable package indexes: hashcash from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | postage payment scheme for email based on hash calculations | http://hashcash.org/
- Nix - hashcash: normalized package name match | nixpkgs package indexes: pkgs/by-name/ha/hashcash/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - hashcash - 1.22-1: normalized package name match | Ubuntu 24.04 LTS package indexes: hashcash from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | postage payment scheme for email based on hash calculations | http://hashcash.org/
- apk - hashcash - 1.22-r0: normalized package name match | Alpine Linux edge package indexes: hashcash from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Proof-of-work algorithm for denial-of-service counter measures | http://www.hashcash.org/
- apk - hashcash-doc - 1.22-r0: normalized package name match | Alpine Linux edge package indexes: hashcash-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Proof-of-work algorithm for denial-of-service counter measures (documentation) | http://www.hashcash.org/


## 相关链接

- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Security and crypto packages](https://www.automicvault.com/zh-hans/pkg/security-crypto-tools/) - Matched security, identity, cryptography, password, signing, or certificate metadata.
- [Web development packages](https://www.automicvault.com/zh-hans/pkg/web-dev-tools/) - Matched web development metadata.
- [openssl@4](https://www.automicvault.com/zh-hans/pkg/brew/openssl-4/) - Runtime dependency declared by Homebrew.
- [argon2](https://www.automicvault.com/zh-hans/pkg/brew/argon2/) - Shares av.db curated category or tags: cli, cryptography, security.
- [badkeys](https://www.automicvault.com/zh-hans/pkg/brew/badkeys/) - Shares av.db curated category or tags: cli, cryptography, security.
- [bcrypt](https://www.automicvault.com/zh-hans/pkg/brew/bcrypt/) - Shares av.db curated category or tags: cli, cryptography, security.
- [bogofilter](https://www.automicvault.com/zh-hans/pkg/brew/bogofilter/) - Shares av.db curated category or tags: cli, email, security.
- [botan](https://www.automicvault.com/zh-hans/pkg/brew/botan/) - Shares av.db curated category or tags: cli, cryptography, security.
- [ccrypt](https://www.automicvault.com/zh-hans/pkg/brew/ccrypt/) - Shares av.db curated category or tags: cli, cryptography, security.
- [cfssl](https://www.automicvault.com/zh-hans/pkg/brew/cfssl/) - Shares av.db curated category or tags: cli, cryptography, security.
- [dbacl](https://www.automicvault.com/zh-hans/pkg/brew/dbacl/) - Shares av.db curated category or tags: cli, email, security.
- [slowhttptest](https://www.automicvault.com/zh-hans/pkg/brew/slowhttptest/) - Security-sensitive metadata or terminology overlaps. Shared terms: attacks, cli, denial, dos, openssl.
- [jose](https://www.automicvault.com/zh-hans/pkg/brew/jose/) - Security-sensitive metadata or terminology overlaps. Shared terms: cli, cryptography, openssl, openssl-4, security.
- [md5sha1sum](https://www.automicvault.com/zh-hans/pkg/brew/md5sha1sum/) - Security-sensitive metadata or terminology overlaps. Shared terms: cli, cryptography, openssl, openssl-4, security.

## Combined YAML source

View the package source record on GitHub. [combined/hashcash.yml](https://github.com/automic-vault/db/blob/main/combined/hashcash.yml)


## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
