Messaging Application
Understanding the Architecture
Integration Steps
Publisher Side
const DPSN = require('dpsn-sdk');
// ... (other initialization steps)
// Generate a salt
const salt = generateSalt();
// Encrypt the salt
const encryptedSalt = encryptMessage(salt, recipientPublicKey);
// Publish the encrypted salt
dpsn.publishMessage('project_chat.userB', encryptedSalt);
// ... (publish encrypted messages using the salt)Subscriber Side
Last updated