(algorithm, baseKey, length)
| 152 | } |
| 153 | |
| 154 | function hkdfDeriveBits(algorithm, baseKey, length) { |
| 155 | validateHkdfDeriveBitsLength(length); |
| 156 | const { hash, salt, info } = algorithm; |
| 157 | |
| 158 | if (length === 0) |
| 159 | return PromiseResolve(new ArrayBuffer(0)); |
| 160 | |
| 161 | return jobPromise(() => new HKDFJob( |
| 162 | kCryptoJobWebCrypto, |
| 163 | normalizeHashName(hash.name), |
| 164 | getCryptoKeyHandle(baseKey), |
| 165 | salt, |
| 166 | info, |
| 167 | length / 8)); |
| 168 | } |
| 169 | |
| 170 | module.exports = { |
| 171 | hkdf, |
nothing calls this directly
no test coverage detected