Skip to content

Commit d26a19c

Browse files
mpetrunicvasco-santos
authored andcommitted
fix: reduce seqno to 8 bytes (#31)
1 parent a3371a0 commit d26a19c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/utils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ exports = module.exports
1212
* @private
1313
*/
1414
exports.randomSeqno = () => {
15-
return crypto.randomBytes(20)
15+
return crypto.randomBytes(8)
1616
}
1717

1818
/**

test/utils.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ describe('utils', () => {
1010
const first = utils.randomSeqno()
1111
const second = utils.randomSeqno()
1212

13-
expect(first).to.have.length(20)
14-
expect(second).to.have.length(20)
13+
expect(first).to.have.length(8)
14+
expect(second).to.have.length(8)
1515
expect(first).to.not.eql(second)
1616
})
1717

0 commit comments

Comments
 (0)