@basmilius/apple-encoding 0.6.4 → 0.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -110,7 +110,7 @@ function encodeTag(tag, value) {
110
110
  } else {
111
111
  valueBuffer = value;
112
112
  }
113
- const lengthBuffer = Buffer.alloc(4);
113
+ const lengthBuffer = Buffer.allocUnsafe(4);
114
114
  lengthBuffer.writeUInt32BE(valueBuffer.length, 0);
115
115
  return Buffer.concat([tagBuffer, lengthBuffer, valueBuffer]);
116
116
  }
@@ -330,7 +330,7 @@ function decode2(buffer) {
330
330
  };
331
331
  }
332
332
  function encode(fields) {
333
- const buffer = Buffer.alloc(32);
333
+ const buffer = Buffer.allocUnsafe(32);
334
334
  buffer.writeUInt8(fields.proto, 0);
335
335
  buffer.writeUInt8(fields.type, 1);
336
336
  buffer.writeUInt16BE(fields.seqno, 2);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@basmilius/apple-encoding",
3
3
  "description": "Common encoding utilities for Apple Protocols.",
4
- "version": "0.6.4",
4
+ "version": "0.6.5",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "author": {