@m-onz/cohort-id

2.0.2 • Public • Published

cohort-id

cohort identity and utils uses: https://www.npmjs.com/package/tweetnacl-blake2b

Create

var Identity = require('@m-onz/cohort-id')

var cohort = Identity()

console.log(cohort.id) // => { secretKey, publicKey }

cohort.hash('hello world!')

Methods

  • newEncryptionKey() => generates 32 bit random password
  • encrypt ((blob, password) => { box, nonce }
  • decrypt (encrypted, nonce, password) => decrypted
  • encryptFor (recipient_pk, message) => { box, nonce }
  • decryptFrom (public_key, nonce, message) => decrypted
  • sign (message) => signature
  • verify (publicKey, signature, message) => boolean
  • hash (something) => base64 blake2B hash

Install

npm install @m-onz/cohort-id --save

Readme

Keywords

none

Package Sidebar

Install

npm i @m-onz/cohort-id

Weekly Downloads

7

Version

2.0.2

License

none

Unpacked Size

5.17 kB

Total Files

4

Last publish

Collaborators

  • m-onz