@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)

/@kravc/identity-encrypt/

    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