1.0.7 • Published 5 years ago

@pacificdatascience/cipher v1.0.7

Weekly downloads
1
License
ISC
Repository
github
Last release
5 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

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago