1.0.1 • Published 1 year ago

securepeerjs v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

SecurePeerJS - PeerJS with hybrid security

Install SecurePeerJS

    npm i securepeerjs

Usage

    // Participants need a SecurePeerKey
    const key = await SecurePeerKey.create('some seed'); 
    const securePeer = new SecurePeer(key);

    securePeer.on('open', () => {
      securePeer.on('connection', (con) => {
        const secureLayer = con.metadata.secureLayer;
        secureLayer.on('decrypted', console.info);
        secureLayer.send('Thanks for your secure message!');
      });
    });

    const somePeerId = (await SecurePeerKey.create()).peerId
    const secureLayer = securePeer.connectSecurely(somePeerId)
    secureLayer.send('Send this securely!')
1.0.1

1 year ago

1.0.0

1 year ago