@li0ard/bash
Bash (STB 34.101.77) hash function in pure TypeScript
docs
# from NPM
npm i @li0ard/bash
# from JSR
bunx jsr i @li0ard/bash
- BASH.HASH128 (256 bit)
- BASH.HASH192 (384 bit)
- BASH.HASH256 (512 bit)
- Programmable automatons (bash-prg)
- Provides simple and modern API
- Most of the APIs are strictly typed
- Fully complies with STB 34.101.77-2020 (in Russian) standard
- Supports Bun, Node.js, Deno, Browsers
import { Bash } from "@li0ard/bash"
let hash = new Bash(32)
hash.update(new TextEncoder().encode("hello world"))
console.log(hash.digest())
// -- OR --
import { bash256 } from "@li0ard/bash"
console.log(bash256(new TextEncoder().encode("hello world")))