1.1.0 • Published 8 months ago
secure-socket v1.1.0
Secure-Socket.IO
Secure-Socket.IO is a real-time communication framework designed to provide secure and encrypted communication between clients and servers using bidirectional encryption and decryption. It ensures that data transmitted between parties is kept confidential and protected from unauthorized access.
Features:
- Bidirectional Encryption & Decryption: Ensures both sender and receiver are encrypting and decrypting messages with unique encryption keys.
- Real-time Communication: Enables secure socket communication in real time for applications such as chat apps, live data transmission, etc.
- Encryption Algorithms: Uses industry-standard encryption methods to secure data (AES, RSA, etc.).
- Easy to Integrate: Simple API for integrating into any existing socket-based communication system.
Installation:
- Clone this repository:
git clone https://github.com/saif177/secure-socket-io.git
const { SecureSocketServer } = require('secure-socket');
const server = new SecureSocketServer({
port: 3000,
encryptionKey: 'your-custom-encryption-key'
});
server.on('connection', (socket) => {
console.log('New client connected');
socket.on('message', (data) => {
console.log('Encrypted message from client:', data);
});
socket.send('Hello, client! This message is encrypted.');
});
Client-side
const { SecureSocketClient } = require('secure-socket');
const client = new SecureSocketClient({
url: 'http://localhost:3000',
encryptionKey: 'your-custom-encryption-key'
});
client.on('connect', () => {
console.log('Connected to server');
client.send('Hello, server! This message is encrypted.');
});
client.on('message', (data) => {
console.log('Encrypted message from server:', data);
});