(os)
| 75 | } |
| 76 | }; |
| 77 | static fromOctetString(os) { |
| 78 | if (os[0] != 0x04) |
| 79 | throw new Error("unsupported format"); |
| 80 | let flen = (os.length - 1) >> 1; |
| 81 | let x = BigInt.fromArrayBuffer(os.slice(1, 1 + flen).buffer); |
| 82 | let y = BigInt.fromArrayBuffer(os.slice(1 + flen, os.length).buffer); |
| 83 | return new ECPoint(x, y); |
| 84 | } |
| 85 | }; |
| 86 | |
| 87 | Object.freeze(ECPoint.prototype); |
no test coverage detected