encrypted-message

1.0.2 • Public • Published

encrypted-message

NPM Version JavaScript Style Guide

sending encrypted messages between two ed25519 key pairs generated by sodium-signatures

Usage

var signatures = require('sodium-signatures')
var encrypted = require('encrypted-message')
 
var sender = signatures.keyPair()
var receiver = signatures.keyPair()
 
var message = encrypted.message(sender, receiver, 'SECRET MESSAGE')
encrypted.openMessage(sender, receiver, message).toString() // === 'SECRET MESSAGE'

API

msg = encrypted.message(sender, receiver, message)

Returns an encrypted message from sender to receiver.

decrypted = encrypted.openMessage(sender, receviver, message)

Returns decrypted message from a message

License

The MIT LIcense

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.21latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.21
1.0.10
1.0.00

Package Sidebar

Install

npm i encrypted-message

Weekly Downloads

1

Version

1.0.2

License

MIT

Last publish

Collaborators

  • poga