study-test-package
v1.0.0
Published
Just a self learning stuff
Downloads
7
Readme
Package NPM Study
Just made it to understand how to build a typescript package. I totally followed this video https://www.youtube.com/watch?v=RnAJNCj0ut0&t=231s
Instalation
yarn add password-hashingUsage
import { validadePassword, hashPassword } from {otavio-password-pack};
const { const, salt } = hashPassword("YOUR PASSWORD");
const isValid = validatePassword("YOUR PASSWORD", salt, hash)
Functions
Typedefs
validadePassword(inputPassword, salt, storedHash) ⇒ boolean
Given the input, salt and the stored hash, return if the password is valod or no.
Kind: global function
| Param | Type | | --- | --- | | inputPassword | string | | salt | string | | storedHash | string |
hashPassword(password) ⇒ HashAndSalt
Given the password and the salt, returns a hash for the password and the salt.
Kind: global function
Returns: HashAndSalt - object containing the hash and the salt used.
| Param | | --- | | password |
HashAndSalt : Object
Kind: global typedef
Properties
| Name | Type | Description | | --- | --- | --- | | hash | string | The hash we got | | salt | string | The salt used for the hash |
