0.1.1 • Published 3 years ago

@kravc/identity-encrypt v0.1.1

Weekly downloads
48
License
ISC
Repository
-
Last release
3 years ago

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