2.0.2 • Published 5 years ago

@m-onz/cohort-id v2.0.2

Weekly downloads
-
License
-
Repository
-
Last release
5 years ago

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
2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.4

5 years ago

1.0.3

6 years ago

1.0.2

6 years ago