Skip to content

Implementation of glibc crypt(3) MD5 password hashing method in TypeScript

Notifications You must be signed in to change notification settings

mszula/crypt3-md5

Repository files navigation

Crypt(3) MD5 hashing algorithm in TypeScript

Simple implementation of Crypt(3) MD5 hashing method from glibc fully written in TypeScript without any dependency. The function allows to generate $1$ at the beginning of password hashes and is fully compatible with crypt function in PHP.

GitHub Workflow Status (with event) npm NPM npm bundle size npm GitHub Repo stars

Installation

npm install crypt3-md5

Quick Start 🚀

🧂 Hash password with salt

import { crypt } from 'crypt3-md5';

const cryptMd5 = crypt('password', '$1$abcdefgh$'); // '$1$abcdefgh$irWbblnpmw.5z7wgBnprh0'

Hash password without salt

import { crypt } from 'crypt3-md5';

const cryptMd5 = crypt('not salty password'); // '$1$$IObRb8Uen32kklOUL1C78.'

Thanks

About

Implementation of glibc crypt(3) MD5 password hashing method in TypeScript

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published