encrypted-message
v1.0.2
Published
send encrypted message with libsodium
Downloads
7
Readme
encrypted-message
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