mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-23 22:11:35 +00:00
chore: update aegir and jsdocs for eslint changes (#773)
This commit is contained in:
@ -12,10 +12,10 @@ log.trace = debug('libp2p:pnet:trace')
|
||||
log.error = debug('libp2p:pnet:err')
|
||||
|
||||
/**
|
||||
* Creates a stream iterable to encrypt messages in a private network
|
||||
* Creates a stream iterable to encrypt messages in a private network
|
||||
*
|
||||
* @param {Uint8Array} nonce The nonce to use in encryption
|
||||
* @param {Uint8Array} psk The private shared key to use in encryption
|
||||
* @param {Uint8Array} nonce - The nonce to use in encryption
|
||||
* @param {Uint8Array} psk - The private shared key to use in encryption
|
||||
* @returns {*} a through iterable
|
||||
*/
|
||||
module.exports.createBoxStream = (nonce, psk) => {
|
||||
@ -28,10 +28,10 @@ module.exports.createBoxStream = (nonce, psk) => {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a stream iterable to decrypt messages in a private network
|
||||
* Creates a stream iterable to decrypt messages in a private network
|
||||
*
|
||||
* @param {Uint8Array} nonce The nonce of the remote peer
|
||||
* @param {Uint8Array} psk The private shared key to use in decryption
|
||||
* @param {Uint8Array} nonce - The nonce of the remote peer
|
||||
* @param {Uint8Array} psk - The private shared key to use in decryption
|
||||
* @returns {*} a through iterable
|
||||
*/
|
||||
module.exports.createUnboxStream = (nonce, psk) => {
|
||||
|
@ -25,8 +25,8 @@ log.error = debug('libp2p:pnet:err')
|
||||
*/
|
||||
class Protector {
|
||||
/**
|
||||
* @param {Uint8Array} keyBuffer The private shared key buffer
|
||||
* @constructor
|
||||
* @param {Uint8Array} keyBuffer - The private shared key buffer
|
||||
* @class
|
||||
*/
|
||||
constructor (keyBuffer) {
|
||||
const decodedPSK = decodeV1PSK(keyBuffer)
|
||||
@ -39,7 +39,7 @@ class Protector {
|
||||
* between its two peers from the PSK the Protector instance was
|
||||
* created with.
|
||||
*
|
||||
* @param {Connection} connection The connection to protect
|
||||
* @param {Connection} connection - The connection to protect
|
||||
* @returns {*} A protected duplex iterable
|
||||
*/
|
||||
async protect (connection) {
|
||||
|
@ -7,7 +7,8 @@ const uint8ArrayFromString = require('uint8arrays/from-string')
|
||||
|
||||
/**
|
||||
* Generates a PSK that can be used in a libp2p-pnet private network
|
||||
* @param {Uint8Array} bytes An object to write the psk into
|
||||
*
|
||||
* @param {Uint8Array} bytes - An object to write the psk into
|
||||
* @returns {void}
|
||||
*/
|
||||
function generate (bytes) {
|
||||
|
Reference in New Issue
Block a user