@chikawa222224/testchikawa222224_2
v2026.8.25-2-9
Published
Hash utility for the bundled binary release asset
Readme
@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:
- The complete bundled file bytes.
- 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.
