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