(algorithm, length)
| 46 | } |
| 47 | |
| 48 | deriveBits(algorithm, length) { |
| 49 | const bytes = Math.ceil(length / 8); |
| 50 | const pkey = new Uint8Array(algorithm.public); |
| 51 | const len = bytes > this._keyBytes ? bytes : this._keyBytes; |
| 52 | const secret = modPow(u8ArrayToBigInt(pkey), this._privateKeyBigInt, this._pBigInt); |
| 53 | return bigIntToU8Array(secret, len).slice(0, len); |
| 54 | } |
| 55 | } |
no test coverage detected