1.0.0 • Published 10 months ago

worker-password-auth v1.0.0

Weekly downloads
-
License
MIT OR Apache-2.0
Repository
github
Last release
10 months ago

Worker Password Auth

A simple wrapper around the Rust password_auth crate to make it available for use in JavaScript. This provides two simple methods to hash a password, and verify the hash against a password. This package is intended to be used in serverless-like environments, specifically Cloudflare workers.

Usage

import { hashPassword, verifyPassword } from "worker-password-auth";

const hash = await hashPassword("abc123");
assert((await verifyPassword("abc123", hash)) === true);

Usage with Vite

This package imports the wasm file directly in web targets. This means in vite you may need to use vite-plugin-wasm.

E.g.

import wasm from "vite-plugin-wasm";
import topLevelAwait from "vite-plugin-top-level-await";

export default {
    plugins: [wasm(), topLevelAwait()],
};

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

1.0.0

10 months ago

0.3.6

10 months ago

0.3.5

10 months ago

0.3.4

10 months ago

0.3.3

10 months ago

0.3.2

10 months ago

0.3.1

10 months ago

0.3.0

10 months ago

0.2.1

10 months ago

0.2.0

10 months ago

0.1.0

10 months ago