Comparing version 7.0.18 to 7.0.19
@@ -506,3 +506,3 @@ "use strict"; | ||
const child = new BERElement(); | ||
sentinel += child.fromBytes(bytes.slice(sentinel)); | ||
sentinel += child.fromBytes(bytes.subarray(sentinel)); | ||
if (child.tagClass === values_1.ASN1TagClass.universal | ||
@@ -615,3 +615,3 @@ && child.construction === values_1.ASN1Construction.primitive | ||
const next = new BERElement(); | ||
i += next.fromBytes(this.value.slice(i)); | ||
i += next.fromBytes(this.value.subarray(i)); | ||
encodedElements.push(next); | ||
@@ -618,0 +618,0 @@ } |
@@ -25,3 +25,3 @@ "use strict"; | ||
case (0b00000000): { | ||
const realString = (0, convertBytesToText_1.default)(value.slice(1)); | ||
const realString = (0, convertBytesToText_1.default)(value.subarray(1)); | ||
switch (value[0] & 0b00111111) { | ||
@@ -28,0 +28,0 @@ case 1: { |
@@ -10,3 +10,3 @@ "use strict"; | ||
const next = new ber_1.default(); | ||
i += next.fromBytes(value.slice(i)); | ||
i += next.fromBytes(value.subarray(i)); | ||
encodedElements.push(next); | ||
@@ -13,0 +13,0 @@ } |
@@ -522,3 +522,3 @@ "use strict"; | ||
const child = new CERElement(); | ||
sentinel += child.fromBytes(bytes.slice(sentinel)); | ||
sentinel += child.fromBytes(bytes.subarray(sentinel)); | ||
if (child.tagClass === values_1.ASN1TagClass.universal | ||
@@ -631,3 +631,3 @@ && child.construction === values_1.ASN1Construction.primitive | ||
const next = new CERElement(); | ||
i += next.fromBytes(this.value.slice(i)); | ||
i += next.fromBytes(this.value.subarray(i)); | ||
encodedElements.push(next); | ||
@@ -634,0 +634,0 @@ } |
@@ -13,3 +13,3 @@ "use strict"; | ||
const next = new cer_1.default(); | ||
i += next.fromBytes(value.slice(i)); | ||
i += next.fromBytes(value.subarray(i)); | ||
encodedElements.push(next); | ||
@@ -16,0 +16,0 @@ } |
@@ -578,3 +578,3 @@ "use strict"; | ||
const next = new DERElement(); | ||
i += next.fromBytes(this.value.slice(i)); | ||
i += next.fromBytes(this.value.subarray(i)); | ||
encodedElements.push(next); | ||
@@ -581,0 +581,0 @@ } |
@@ -25,3 +25,3 @@ "use strict"; | ||
case (0b00000000): { | ||
const realString = (0, convertBytesToText_1.default)(value.slice(1)); | ||
const realString = (0, convertBytesToText_1.default)(value.subarray(1)); | ||
switch (value[0] & 0b00111111) { | ||
@@ -28,0 +28,0 @@ case 1: |
@@ -13,3 +13,3 @@ "use strict"; | ||
const next = new der_1.default(); | ||
i += next.fromBytes(value.slice(i)); | ||
i += next.fromBytes(value.subarray(i)); | ||
encodedElements.push(next); | ||
@@ -16,0 +16,0 @@ } |
@@ -32,3 +32,3 @@ "use strict"; | ||
const additionalNodes = Array | ||
.from((0, splitBytesByContinuationBit_1.default)(value.slice(1))) | ||
.from((0, splitBytesByContinuationBit_1.default)(value.subarray(1))) | ||
.map((b) => { | ||
@@ -40,3 +40,3 @@ if (b.length > 1 && b[0] === 0x80) { | ||
}) | ||
.map((b) => ((b[0] === 0) ? b.slice(1) : b)) | ||
.map((b) => ((b[0] === 0) ? b.subarray(1) : b)) | ||
.map(utils_1.decodeUnsignedBigEndianInteger); | ||
@@ -43,0 +43,0 @@ nodes.push(...additionalNodes); |
@@ -13,3 +13,5 @@ "use strict"; | ||
.map(encodeBase128_1.default) | ||
.map((arc) => ((arc[0] === 0x80) ? arc.slice(1) : arc)); | ||
.map((arc) => ((arc[0] === 0x80) | ||
? arc.subarray(1) | ||
: arc)); | ||
return Buffer.concat([pre, ...post]); | ||
@@ -16,0 +18,0 @@ } |
@@ -10,5 +10,7 @@ "use strict"; | ||
.map(encodeBase128_1.default) | ||
.map((arc) => ((arc[0] === 0x80) ? arc.slice(1) : arc))); | ||
.map((arc) => ((arc[0] === 0x80) | ||
? arc.subarray(1) | ||
: arc))); | ||
} | ||
exports.default = encodeRelativeObjectIdentifier; | ||
//# sourceMappingURL=encodeRelativeObjectIdentifier.js.map |
@@ -41,3 +41,3 @@ "use strict"; | ||
buf.writeInt32BE(int); | ||
return buf.slice(1); | ||
return buf.subarray(1); | ||
} | ||
@@ -73,3 +73,3 @@ else if ((int >= values_1.MIN_SINT_32) && (int <= values_1.MAX_SINT_32)) { | ||
} | ||
return ret.slice(startOfNonPadding); | ||
return ret.subarray(startOfNonPadding); | ||
} | ||
@@ -124,3 +124,3 @@ } | ||
} | ||
return ret.slice(startOfNonPadding); | ||
return ret.subarray(startOfNonPadding); | ||
} | ||
@@ -127,0 +127,0 @@ } |
@@ -9,3 +9,3 @@ "use strict"; | ||
} | ||
return (Buffer.from(bytes.buffer)).toString(codec); | ||
return (Buffer.from(bytes.buffer, bytes.byteOffset, bytes.length)).toString(codec); | ||
} | ||
@@ -12,0 +12,0 @@ else if (typeof TextEncoder !== "undefined") { |
@@ -25,3 +25,3 @@ "use strict"; | ||
case (0b00000000): { | ||
const realString = (0, convertBytesToText_1.default)(bytes.slice(1)); | ||
const realString = (0, convertBytesToText_1.default)(bytes.subarray(1)); | ||
switch (bytes[0] & 0b00111111) { | ||
@@ -28,0 +28,0 @@ case 1: { |
@@ -24,5 +24,5 @@ "use strict"; | ||
} | ||
return bytes.slice(startOfNonPadding); | ||
return bytes.subarray(startOfNonPadding); | ||
} | ||
exports.default = encodeUnsignedBigEndianInteger; | ||
//# sourceMappingURL=encodeUnsignedBigEndianInteger.js.map |
@@ -7,3 +7,3 @@ "use strict"; | ||
if (!(value[i] & 0b10000000)) { | ||
yield value.slice(lastChunkStartIndex, (i + 1)); | ||
yield value.subarray(lastChunkStartIndex, (i + 1)); | ||
lastChunkStartIndex = (i + 1); | ||
@@ -10,0 +10,0 @@ } |
@@ -5,3 +5,3 @@ "use strict"; | ||
for (let i = 0; i < value.length; i += 1000) { | ||
yield value.slice(i, i + 1000); | ||
yield value.subarray(i, i + 1000); | ||
} | ||
@@ -8,0 +8,0 @@ } |
@@ -16,5 +16,5 @@ "use strict"; | ||
} | ||
return value.slice(startOfNonPadding); | ||
return value.subarray(startOfNonPadding); | ||
} | ||
exports.default = trimLeadingPaddingBytes; | ||
//# sourceMappingURL=trimLeadingPaddingBytes.js.map |
@@ -64,3 +64,3 @@ { | ||
"types": "./dist/node/index.d.ts", | ||
"version": "7.0.18", | ||
"version": "7.0.19", | ||
"dependencies": { | ||
@@ -67,0 +67,0 @@ "tslib": "^2.4.1" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
694099
7679