Skip to content

Commit a4b8017

Browse files
chore: apply suggestions from code review
Co-Authored-By: Vasco Santos <[email protected]>
1 parent b803efa commit a4b8017

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/insecure/plaintext.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ async function encrypt (localId, conn, remoteId) {
4040
peerId = await PeerId.createFromPubKey(id.pubkey.Data)
4141
} catch (err) {
4242
log.error(err)
43-
throw new InvalidCryptoExchangeError('Remote did not provide their public key')
43+
throw new InvalidCryptoExchangeError('Remote did not provide its public key')
4444
}
4545

4646
if (remoteId && !peerId.isEqual(remoteId)) {

src/pnet/crypto.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ log.trace = debug('libp2p:pnet:trace')
1010
log.error = debug('libp2p:pnet:err')
1111

1212
/**
13-
* Creates a pull stream to encrypt messages in a private network
13+
* Creates a stream iterable to encrypt messages in a private network
1414
*
1515
* @param {Buffer} nonce The nonce to use in encryption
1616
* @param {Buffer} psk The private shared key to use in encryption
@@ -26,7 +26,7 @@ module.exports.createBoxStream = (nonce, psk) => {
2626
}
2727

2828
/**
29-
* Creates a pull stream to decrypt messages in a private network
29+
* Creates a stream iterable to decrypt messages in a private network
3030
*
3131
* @param {Buffer} nonce The nonce of the remote peer
3232
* @param {Buffer} psk The private shared key to use in decryption

src/pnet/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const {
1111
decodeV1PSK
1212
} = require('./crypto')
1313
const handshake = require('it-handshake')
14-
const NONCE_LENGTH = require('./key-generator').NONCE_LENGTH
14+
const { NONCE_LENGTH } = require('./key-generator')
1515
const debug = require('debug')
1616
const log = debug('libp2p:pnet')
1717
log.err = debug('libp2p:pnet:err')

0 commit comments

Comments
 (0)