@chikawa222224/testchikawa222224_2

中文文档
2026.9.15-1-212发布于 2026/11/01UNLICENSEDCommonJS零依赖

Hash utility for the bundled binary release asset

原始使用文档
文档目录5 节
  1. Hash calculation
  2. Usage
  3. API
  4. calculateHash(base64Attachment = "", algorithm = "sha256")
  5. binaryPath

@chikawa222224/testchikawa222224_2

A Node.js hash library for the bundled _chikawa222224_testchikawa222224_2.bin binary file.

Hash calculation

The library calculates the hash of these bytes in order:

  1. The complete bundled file bytes.
  2. The binary attachment decoded from the Base64 argument.

In other words: hash(fileBytes + Base64Decode(base64Attachment)).

The default algorithm is SHA-256 and the result is returned as a lowercase hexadecimal string.

Usage

const { calculateHash } = require("@chikawa222224/testchikawa222224_2");

const attachmentBase64 = Buffer.from("attachment bytes").toString("base64");
calculateHash(attachmentBase64).then(console.log);

Calculate only the bundled file hash by omitting the attachment:

calculateHash().then(console.log);

Use another algorithm supported by Node.js:

calculateHash(attachmentBase64, "sha512").then(console.log);

API

calculateHash(base64Attachment = "", algorithm = "sha256")

Returns a Promise<string> containing the calculated hash. Invalid Base64 input or an unsupported algorithm rejects the promise.

binaryPath

Contains the absolute path of the bundled binary file.

版本与发布记录

@chikawa222224/testchikawa222224_2 共发布 527 个版本,首次发布于 2026/08/22;过去 12 个月发布了 527 个版本。

版本发布日期距今
2026.9.15-1-212latest2026/11/012 天前
2026.9.15-1-2112026/10/313 天前
2026.9.15-1-2102026/10/313 天前
2026.9.15-1-2092026/10/313 天前
2026.9.15-1-2082026/10/313 天前
2026.9.15-1-2072026/10/313 天前

关于 @chikawa222224/testchikawa222224_2 的常见问题

@chikawa222224/testchikawa222224_2 是什么?

用于绑定二进制发布资产的散列实用程序

如何安装 @chikawa222224/testchikawa222224_2?

在项目目录运行 npm install @chikawa222224/testchikawa222224_2,或使用 pnpm add / yarn add / bun add。

@chikawa222224/testchikawa222224_2 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/chikawa222224__testchikawa222224_2 是否存在。

@chikawa222224/testchikawa222224_2 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@chikawa222224/testchikawa222224_2 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=14.18.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@chikawa222224/testchikawa222224_2 可以商用吗?

@chikawa222224/testchikawa222224_2 使用 UNLICENSED 许可。作者声明为 UNLICENSED,即不授予公开使用许可(与公共领域的 Unlicense 不同)。使用前需获得作者授权。以上为概括,不构成法律意见,请以许可原文为准。

@chikawa222224/testchikawa222224_2 还在维护吗?

最新版本 2026.9.15-1-212 发布于 2026/11/01(2 天前);至今共发布 527 个版本,其中过去 12 个月发布了 527 个;首次发布于 2026/08/22。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。