@kravc/identity-encrypt

0.1.1 • Public • Published

@kravc/identity-encrypt

Encryption utility for @kravc/identity.

Usage Example

Install npm package:

npm i --save @kravc/identity-encrypt

Encrypt object with public key:

const { encrypt } = require('@kravc/identity-encrypt')

const encryptedBody = await encrypt(publicKeyHex, [ signedCredential ])
console.log(encryptedBody)

Decrypt message with private key:

const { decrypt } = require('@kravc/identity-encrypt')

const [ signedCredential ] = await decrypt(privateKeyHex, encryptedBody)
console.log(signedCredential)

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i @kravc/identity-encrypt

Weekly Downloads

0

Version

0.1.1

License

ISC

Unpacked Size

3.14 kB

Total Files

6

Last publish

Collaborators

  • kravc