1.1.12 • Published 5 months ago

@hazae41/sha1 v1.1.12

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Sha1

SHA-1 adapter for WebAssembly and JS implementations

npm i @hazae41/sha1

Node Package 📦

Features

Current features

  • 100% TypeScript and ESM
  • No external dependencies

Getting started

Morax (WebAssembly)

npm i @hazae41/morax
import { Sha1 } from "@hazae41/sha1"

Sha1.set(await Sha1.fromMorax())

Noble (JavaScript)

npm i @noble/hashes
import { Sha1 } from "@hazae41/sha1"

Sha1.set(Sha1.fromNoble())

Usage

Direct

const hashed: Uint8Array = Sha1.get().tryHash(new Uint8Array([1,2,3,4,5])).unwrap().copyAndDispose()

Incremental

const hasher = Sha1.get().Hasher.tryNew().unwrap()
hasher.tryUpdate(new Uint8Array([1,2,3,4,5])).unwrap()
const hashed: Uint8Array = hasher.tryFinalize().unwrap().copyAndDispose()
1.1.1

8 months ago

1.1.0

8 months ago

1.1.9

7 months ago

1.1.8

7 months ago

1.1.7

8 months ago

1.1.6

8 months ago

1.1.5

8 months ago

1.1.4

8 months ago

1.1.3

8 months ago

1.1.2

8 months ago

1.1.12

5 months ago

1.1.11

5 months ago

1.1.10

6 months ago

1.0.2

11 months ago

1.0.0

1 year ago