How Secure Is My Password?
These modules are written using PureScript and then transpiled into JavaScript. You do not need to know PureScript to use the built versions of the code as it functions as a standard JS library.
Usage
Using ES6 modules:
// import the hsimp-purescript module; ;;;; // create the hsimp function// if passed valid config, setup will return a functionconst hsimp = ; // to runconst result = ;
You will get back an object with the following structure:
// how long it would take to crack the password as a human readable string time: "42 minutes" // the highest level of check (e.g. insecure, warning, notice - see below) level: "notice" // the checks - in level of importance checks: name: "Character Variety: No Symbols" message: "Your password only contains numbers and letters. Adding a symbol can make your password more secure. Don\'t forget you can often use spaces in passwords." level: "notice" // ...and so on
See dist/test.js
for a fully working version of the code in Node.
Levels
There are five levels:
insecure
: a really bad password, probably very commonwarning
: might be ok, but things to be aware ofeaster-egg
: they've found something sillynotice
: nothing majorachievement
: something to be proud of
Building
To build the code you'll require spago
. Then just run make
. However, the latest build should always be available in the dist
directory.