1.0.7 • Published 4 years ago

@pacificdatascience/cipher v1.0.7

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

Asynchronous Strong Hashing Package

This package uses asynchronous scrypt along with a random salt to create secure hashes.

Installation

npm install @pacificdatascience/cipher

Usage

const cipher = require('@pacificdatascience/cipher')

const hash = await cipher.hash('some text')

return await cipher.compare('some text', hash)

const encrypted = await cipher.encrypt('password', 'salt', { id: 1234, title: 'Sample text' })

const decrypted = await cipher.decrypt('password', 'salt', encrypted)
1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago