(key, ctor)
| 82 | } |
| 83 | |
| 84 | function wrapKey(key, ctor) { |
| 85 | if (typeof key === 'string' || |
| 86 | isArrayBufferView(key) || |
| 87 | isJwk(key)) |
| 88 | return key; |
| 89 | return new ctor(key); |
| 90 | } |
| 91 | |
| 92 | function generateKeyPair(type, options, callback) { |
| 93 | if (typeof options === 'function') { |
no test coverage detected
searching dependent graphs…