(obj)
| 70 | // Create a string representation of keyGeneration parameters for |
| 71 | // test names and labels. |
| 72 | function objectToString(obj) { |
| 73 | var keyValuePairs = []; |
| 74 | |
| 75 | if (Array.isArray(obj)) { |
| 76 | return "[" + obj.map(function(elem){return objectToString(elem);}).join(", ") + "]"; |
| 77 | } else if (typeof obj === "object") { |
| 78 | Object.keys(obj).sort().forEach(function(keyName) { |
| 79 | keyValuePairs.push(keyName + ": " + objectToString(obj[keyName])); |
| 80 | }); |
| 81 | return "{" + keyValuePairs.join(", ") + "}"; |
| 82 | } else if (typeof obj === "undefined") { |
| 83 | return "undefined"; |
| 84 | } else { |
| 85 | return obj.toString(); |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | // Is key a CryptoKey object with correct algorithm, extractable, and usages? |
| 90 | // Is it a secret, private, or public kind of key? |
no test coverage detected