npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

password-crypt

v3.0.0

Published

Provide more secure encryption using more than one library and over an algorithm 🤓 ..

Downloads

46

Readme

P-CRYPT

Build Status Coverage Status NPM version License Code Size

A Promise-based library build on top of bcrypt/argon2 module with some logic touch to help you hash passwords.

Installation

# npm .
$ npm install password-crypt
# yarn ..
$ yarn add password-crypt

Usage

This is a very basic example of how to use.

// const { PasswordCrypt } = require("password-crypt");
import { PasswordCrypt } from "password-crypt";

// PasswordCrypt instance
// Note: you can pass an config object
const pCrypt = new PasswordCrypt();

// default config object
// {
// secret: 'my-secret',
// algorithm: 'sha512',
// saltSize: 10,
// withArgon: false
// }

// helpers
const hash = (pwd: string) => pCrypt.hash(pwd);
const compare = (pwd: string, hash: string) => pCrypt.compare(pwd, hash);

// also you can pass other configuration by env-vars through process.env
// P_CRYPT_SECRET: same as secret in the config object
// P_CRYPT_ALGORITHM: same as algorithm in the config object
// P_CRYPT_SALT_SIZE: same as saltSize in the config object
// P_CRYPT_WITH_ARGON: same as withArgon in the config object
// ---- secrets used by p-crypt to make the crypt process more complex ---- //
// P_CRYPT_SPECIAL_CHARS
// P_CRYPT_EMOJIS
// P_CRYPT_ARABIC_CHARS
// P_CRYPT_LATINO_CHARS
// P_CRYPT_CHINESE_CHARS
// P_CRYPT_TURKISH_CHARS
// P_CRYPT_SWEDISH_CHARS

You can play around with [email protected] on this sandbox codesandbox.io/password-crypt.

License


MIT © Imed Jaberi