(keyData, algorithm)
| 104 | |
| 105 | // Build minimal Jwk objects from raw key data and algorithm specifications |
| 106 | function jwkData(keyData, algorithm) { |
| 107 | var result = { |
| 108 | kty: "oct", |
| 109 | k: byteArrayToUnpaddedBase64(keyData) |
| 110 | }; |
| 111 | |
| 112 | if (algorithm.name.substring(0, 3) === "AES") { |
| 113 | result.alg = "A" + (8 * keyData.byteLength).toString() + algorithm.name.substring(4); |
| 114 | } else if (algorithm.name === "HMAC") { |
| 115 | result.alg = "HS" + algorithm.hash.substring(4); |
| 116 | } |
| 117 | return result; |
| 118 | } |
| 119 | |
| 120 | // Convert method parameters to a string to uniquely name each test |
| 121 | function parameterString(format, data, algorithm, extractable, usages) { |
nothing calls this directly
no test coverage detected