Skip to content

Latest commit

 

History

History
51 lines (32 loc) · 634 Bytes

File metadata and controls

51 lines (32 loc) · 634 Bytes

Oxide

A secure, extensible hashing library.

Installation

npm install @gottheflag/oxide
pnpm add @gottheflag/oxide
yarn add @gottheflag/oxide

Usage

import { SHA1 } from "@gottheflag/oxide/sha1";

const sha1 = new SHA1();

sha1.update("Hello, world!");

console.log(sha1.digest("hex"));

Digest bytes can also be returned:

const bytes = sha1.digest();

CommonJS is also supported:

const { SHA1 } = require("@gottheflag/oxide/sha1");

const sha1 = new SHA1();

sha1.update("Hello, world!");

console.log(sha1.digest("hex"));

License

Apache-2.0