1.0.0 • Published 1 month ago

@zugriff/cryptography v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

@zugriff/cryptography

This package is part of the zugriff ecosystem. It benefits from a direct integration on our systems and falls back to WASM on yours.

@zugriff/cryptography adheres to the OWASP minimum requirements. Hashes are returned PHC formatted.

Usage

npm i --save @zugriff/cryptography

Argon2

Recommended

import { argon2id } from '@zugriff/cryptography';

// Create account
const password = await argon2id.hash('password'); // $argon2id$v=19..

// Login
await argon2id.verify('password', password); // true

Scrypt

import { scrypt } from '@zugriff/cryptography';

// Create account
const password = await scrypt.hash('password'); // $scrypt$ln=17..

// Login
await scrypt.verify('password', password); // true
1.0.0

1 month ago