(hash, key, salt, info, length)
| 125 | } |
| 126 | |
| 127 | function hkdfSync(hash, key, salt, info, length) { |
| 128 | ({ |
| 129 | hash, |
| 130 | key, |
| 131 | salt, |
| 132 | info, |
| 133 | length, |
| 134 | } = validateParameters(hash, key, salt, info, length)); |
| 135 | |
| 136 | const job = new HKDFJob(kCryptoJobSync, hash, key, salt, info, length); |
| 137 | const { 0: err, 1: bits } = job.run(); |
| 138 | if (err !== undefined) |
| 139 | throw err; |
| 140 | |
| 141 | return bits; |
| 142 | } |
| 143 | |
| 144 | function validateHkdfDeriveBitsLength(length) { |
| 145 | if (length === null) |
no test coverage detected