(algorithm, baseKey, length)
| 110 | } |
| 111 | |
| 112 | function pbkdf2DeriveBits(algorithm, baseKey, length) { |
| 113 | validatePbkdf2DeriveBitsLength(length); |
| 114 | const { iterations, hash, salt } = algorithm; |
| 115 | |
| 116 | if (length === 0) |
| 117 | return PromiseResolve(new ArrayBuffer(0)); |
| 118 | |
| 119 | return jobPromise(() => new PBKDF2Job( |
| 120 | kCryptoJobWebCrypto, |
| 121 | getCryptoKeyHandle(baseKey), |
| 122 | salt, |
| 123 | iterations, |
| 124 | length / 8, |
| 125 | normalizeHashName(hash.name))); |
| 126 | } |
| 127 | |
| 128 | module.exports = { |
| 129 | pbkdf2, |
nothing calls this directly
no test coverage detected