ws-rc4

0.1.3 • Public • Published

ws-rc4

RC4-encrypted websocket library

NPM

Install

npm install --save ws-rc4

Usage

This library encrypts all connections spawned from it with a single key. Encrypting all connections from this library allows you to have private communications between servers (or browsers, if you want that). Those who do not know the encryption key simply see jibberish.

Node.JS

In the background, the ws package is used. This package is designed to simply wrap around it, resulting in the exact same usage.

const WSRC4 = require('ws-rc4');
 
// Generate a new encrypted 'ws' library
let WS = WSRC4("ENCRYPTION KEY");
 
// Take a look at https://npmjs.com/package/ws for how to continue

Browser

You could use requirejs, browserify or simply load dist/browser.js directly.

<!-- Directly load the lib -->
<!-- Registers anonymously to RequireJS or onto window.WSRC4 -->
<script src="https://unpkg.com/ws-rc4/dist/browser.js"></script>
// Browserify usages matches node's usage
// Keep in mind that ws.Server is not supported in browser
const WSRC4 = require('ws-rc4');

Readme

Keywords

none

Package Sidebar

Install

npm i ws-rc4

Weekly Downloads

1

Version

0.1.3

License

Ratus Unilicense 1.0

Unpacked Size

31.1 kB

Total Files

16

Last publish

Collaborators

  • finwo