(keyPair, algorithm, usagesByType, expected)
| 189 | } |
| 190 | |
| 191 | function asymmetricVectors(keyPair, algorithm, usagesByType, expected) { |
| 192 | const { publicKey, privateKey } = keyPair; |
| 193 | const vectors = []; |
| 194 | for (const keyObject of [publicKey, privateKey]) { |
| 195 | vectors.push(vector( |
| 196 | keyObject, |
| 197 | algorithm, |
| 198 | getUsages(keyObject, usagesByType), |
| 199 | expected)); |
| 200 | } |
| 201 | return vectors; |
| 202 | } |
| 203 | |
| 204 | function rsaVectors(name, usagesByType) { |
| 205 | const keyPair = generateKeyPairSync('rsa', { modulusLength: 2048 }); |
no test coverage detected