# 使用 Homebrew, dnf 安装 sha2

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

## 安装

```sh
sudo av install brew:sha2
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install sha2
```

  证据: local Homebrew formula metadata

### Linux

- dnf (92%):

```sh
sudo dnf install sha2
```

  证据: Fedora Rawhide package metadata: sha2 from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst

## 软件包事实

- **软件包键:** brew:sha2
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/sha2>
- **版本:** 1.0.1
- **来源摘要:** Implementation of SHA-256, SHA-384, and SHA-512 hash algorithms
- **主页:** <https://aarongifford.com/computers/sha.html>
- **上游文档:** <https://aarongifford.com/computers/sha.html>
- **许可证:** BSD-3-Clause
- **源码归档:** <https://aarongifford.com/computers/sha2-1.0.1.tgz>
- **最后更新:** 2026-06-22T08:08:16+02:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- sha2 (cli)
- sha2 (别名)

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.0.1
- 管理器更新时间: 2026-06-22
- 本地数据: OK
- 上游仓库: https://aarongifford.com/computers/sha.html
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

SHA-2 is Aaron D. Gifford's BSD-licensed C implementation of the SHA-224, SHA-256, SHA-384, and SHA-512 secure hash algorithms, accompanied by a small `sha2` command-line program.

### 项目历史

Gifford dates the original implementation to a weekend in autumn 2000, specifically 14 October, when the SHA-256, SHA-384, and SHA-512 algorithms were newly described. The author distributes the implementation from his own cryptographic-hashing pages as source archives rather than through a public source-control forge.

### 采用历史

The supplied package metadata records packages in Homebrew and DNF-based distributions. Its adoption is therefore best understood as a compact reference implementation and hashing utility preserved by package collections rather than a broad end-user application.

### 使用方式

The `sha2` executable computes SHA-2 message digests for files or input, while the C sources can also be embedded by developers who need the covered hash functions. It requires no persistent configuration or credentials.

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

The package captures an early open-source implementation of the SHA-2 family close to the algorithms' introduction. It remains interesting as small, auditable C code and as a historical alternative to the hashing commands bundled with larger cryptographic toolkits.

### 时间线

- 2000: Aaron D. Gifford implemented the newly described SHA-256, SHA-384, and SHA-512 algorithms in C.
- Later: SHA-224 and SHA-1 support appeared on the author's consolidated BSD-licensed implementation page.

### Related projects

- The author's cryptographic code collection also includes SHA-1 and HMAC-SHA1 implementations; modern general-purpose toolkits provide overlapping digest commands and libraries.

### 来源

- <https://aarongifford.com/computers/>
- <https://aarongifford.com/computers/sha.html>
- source_facts.description
- source_facts.executables
- source_facts.package-manager


## 安全说明

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:** sha2
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** yes
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

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

- dnf - sha2 - 1.0.1-32.fc45: normalized package name match | Fedora Rawhide package metadata: sha2 from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | SHA Implementation Library | http://www.aarongifford.com/computers/sha.html
- dnf - sha2-devel - 1.0.1-32.fc45: normalized package name match | Fedora Rawhide package metadata: sha2-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Development files for sha2 | http://www.aarongifford.com/computers/sha.html


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Security and crypto packages](https://pkg.so/zh-hans/security-crypto-tools/) - Matched security, identity, cryptography, password, signing, or certificate metadata.
- [Web development packages](https://pkg.so/zh-hans/web-dev-tools/) - Matched web development metadata.
- [nettle](https://pkg.so/zh-hans/brew/nettle/) - Shares pkgdb curated category or tags: cli, cryptography, hashing, security.
- [pdfcrack](https://pkg.so/zh-hans/brew/pdfcrack/) - Shares pkgdb curated category or tags: c, cli, cryptography, security.
- [sha3sum](https://pkg.so/zh-hans/brew/sha3sum/) - Shares pkgdb curated category or tags: cli, cryptography, hashing, security.
- [b3sum](https://pkg.so/zh-hans/brew/b3sum/) - Shares pkgdb curated category or tags: cli, cryptography, hashing, security.
- [ntbtls](https://pkg.so/zh-hans/brew/ntbtls/) - Shares pkgdb curated category or tags: c, cli, cryptography, security.
- [sha1dc](https://pkg.so/zh-hans/brew/sha1dc/) - Shares pkgdb curated category or tags: cli, cryptography, hashing, security.
- [openssl@3](https://pkg.so/zh-hans/brew/openssl-3/) - Shares pkgdb curated category or tags: cli, cryptography, security.
- [gnutls](https://pkg.so/zh-hans/brew/gnutls/) - Shares pkgdb curated category or tags: cli, cryptography, security.
- [rhash](https://pkg.so/zh-hans/brew/rhash/) - Security-sensitive metadata or terminology overlaps. Shared terms: 256, 512, cli, cryptography, hash.

## Combined YAML source

View the package source record on GitHub. [combined/sha2.yml](https://github.com/mxcl/pkgdb/blob/main/combined/sha2.yml)


## 来源

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