sha512-crypt-ts
TypeScript icon, indicating that this package has built-in type declarations

0.1.27 • Public • Published

PRs Welcome Build Test and publish codecov Total alerts Language grade: JavaScript

SHA-512-crypt-ts

Crypt compatible typescript implementation inspired by mvo5/sha512crypt-node

Installation

Install NPM package

npm install --save sha512-crypt-ts

Import module

import { sha512 } from 'sha512-crypt-ts';

Usage

sha512.crypt('password', 'saltsalt');
// This is equivalent to: printf "password" | mkpasswd --stdin --method=sha-512 --salt=saltsalt
// Returns $6$saltsalt$qFmFH.bQmmtXzyBY0s9v7Oicd2z4XSIecDzlB5KiA2/jctKu9YterLp8wwnSq.qc.eoxqOmSuNp2xS0ktL3nh/

Another examples can be found in unit tests or in peer project bedlaj/unifi-reset-password.

Documentation

Generated docs can be found at https://bedlaj.github.io/sha512-crypt-ts/modules/sha512.html

Dependencies (0)

    Dev Dependencies (10)

    Package Sidebar

    Install

    npm i sha512-crypt-ts

    Weekly Downloads

    2,739

    Version

    0.1.27

    License

    Apache-2.0

    Unpacked Size

    31.6 kB

    Total Files

    4

    Last publish

    Collaborators

    • bedlaj