Skip to content

Commit

Permalink
chore: apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-Authored-By: Vasco Santos <vasco.santos@moxy.studio>
  • Loading branch information
jacobheun and vasco-santos authored Nov 4, 2019
1 parent dc9d91c commit 2d9aa30
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/insecure/plaintext.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async function encrypt (localId, conn, remoteId) {
peerId = await PeerId.createFromPubKey(id.pubkey.Data)
} catch (err) {
log.error(err)
throw new InvalidCryptoExchangeError('Remote did not provide their public key')
throw new InvalidCryptoExchangeError('Remote did not provide its public key')
}

if (remoteId && !peerId.isEqual(remoteId)) {
Expand Down
4 changes: 2 additions & 2 deletions src/pnet/crypto.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ log.trace = debug('libp2p:pnet:trace')
log.error = debug('libp2p:pnet:err')

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

/**
* Creates a pull stream to decrypt messages in a private network
* Creates a stream iterable to decrypt messages in a private network
*
* @param {Buffer} nonce The nonce of the remote peer
* @param {Buffer} psk The private shared key to use in decryption
Expand Down
2 changes: 1 addition & 1 deletion src/pnet/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const {
decodeV1PSK
} = require('./crypto')
const handshake = require('it-handshake')
const NONCE_LENGTH = require('./key-generator').NONCE_LENGTH
const { NONCE_LENGTH } = require('./key-generator')
const debug = require('debug')
const log = debug('libp2p:pnet')
log.err = debug('libp2p:pnet:err')
Expand Down

0 comments on commit 2d9aa30

Please sign in to comment.