+
Skip to content

li0ard/bash

Repository files navigation

@li0ard/bash
Bash (STB 34.101.77) hash function in pure TypeScript
docs




Installation

# from NPM
npm i @li0ard/bash

# from JSR
bunx jsr i @li0ard/bash

Supported modes

  • BASH.HASH128 (256 bit)
  • BASH.HASH192 (384 bit)
  • BASH.HASH256 (512 bit)
  • Programmable automatons (bash-prg)

Features

  • 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

Examples

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")))
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载