(len)
| 124 | return this._getObjectIdentifier(this.getLength()) |
| 125 | } |
| 126 | _getObjectIdentifier(len) { |
| 127 | let i = this.#a[this.#i++]; |
| 128 | const oid = new Uint32Array(new ArrayBuffer((2 + len) << 2, {maxByteLength: (2 + len) << 2})); |
| 129 | oid[0] = Math.idiv(i, 40); |
| 130 | oid[1] = Math.irem(i, 40); |
| 131 | let index = 2; |
| 132 | --len; |
| 133 | while (len > 0) { |
| 134 | let v = 0; |
| 135 | while (--len >= 0 && (i = this.#a[this.#i++]) >= 0x80) |
| 136 | v = (v << 7) | (i & 0x7f); |
| 137 | oid[index++] = (v << 7) | i; |
| 138 | } |
| 139 | oid.buffer.resize(index << 2); |
| 140 | return oid; |
| 141 | } |
| 142 | getSequence() { |
| 143 | if (this.getTag() != 0x30) |
| 144 | throw new Error("BER: not a sequence"); |
no test coverage detected