npm install spacecrypt --save
// import Spacecrypt from 'spacecrypt';
const Spacecrypt = require('spacecrypt');
const publicMessage = 'Hello';
const privateMessage = 'World';
const encodedMessage = Spacecrypt.encrypt(publicMessage, privateMessage);
console.log(encodedMessage); // 'Hello'
const decodedMessage = Spacecrypt.decrypt(encodedMessage);
console.log(decodedMessage); // 'World'
assert(decodedMessage === privateMessage);