承接 amashukov/keccak-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

amashukov/keccak-php

Composer 安装命令:

composer require amashukov/keccak-php

包简介

Keccak-256 and SHA-3 family permutations in pure PHP.

README 文档

README

Pure-PHP Keccak-256, SHA-3 and SHAKE hashing — the keccak256 primitive behind Ethereum addresses, ABI selectors and EVM signatures.

CI PHPStan L9 Latest Version Downloads PHP License Stars

amashukov/keccak-php is a pure-PHP implementation of the Keccak / SHA-3 family of cryptographic hash functions, including the SHAKE extendable-output functions (XOF). It provides the keccak256 hash primitive used across Ethereum and other modern blockchains for address derivation, ABI function selectors and EIP-191 / EIP-712 message signing. Zero composer dependencies — only ext-mbstring from PHP core.

Features

  • Keccak-256 — the exact hash Ethereum uses for keccak256, address derivation and ABI selectors.
  • Full SHA-3 family — output sizes 224, 256, 384, 512.
  • SHAKE128 / SHAKE256 extendable-output functions with arbitrary output length.
  • Hex or raw binary output via a single raw_output flag.
  • Pure PHP — no native extension to compile, no FFI; runs anywhere PHP 8.3 runs.
  • Zero composer dependenciesext-mbstring only.
  • PHPStan level 9 clean, @PER-CS formatted, CI-tested.

Installation

composer require amashukov/keccak-php

Usage

use Amashukov\Keccak\Keccak;

// Hex-encoded hash output (default).
$digest = Keccak::hash('hello world', 256);
// → 47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad

// Raw 32-byte binary output.
$raw = Keccak::hash('hello world', 256, raw_output: true);

Supported output sizes: 224, 256, 384, 512. SHAKE variants:

$xof = Keccak::shake('hello world', security_level: 128, outlen: 256);

Requirements

  • PHP 8.3+
  • ext-mbstring

No composer dependencies.

Related packages

Part of a modular pure-PHP blockchain toolkit:

Package Purpose
amashukov/keccak-php Keccak-256 / SHA-3 / SHAKE hashing
amashukov/secp256k1-php secp256k1 ECDSA sign / verify / recover
amashukov/rlp-php Ethereum RLP encode / decode
amashukov/ton-cell-php TON TLB Cell / Builder / Slice / BOC
amashukov/abi-encoder-php Ethereum ABI encoder
amashukov/eip1559-tx-signer-php EIP-1559 transaction signer
amashukov/eth-rpc-client-php Ethereum JSON-RPC client
amashukov/eth-php EVM umbrella package

Quality

  • PHPStan level 9.
  • php-cs-fixer with the @PER-CS ruleset.
  • GitHub Actions CI on every push.
  • Test vectors validated against the published Keccak / SHA-3 reference outputs.

License

MIT License.

统计信息

  • 总下载量: 378
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固