(isPublic, keyData, format, name, namedCurve)
| 218 | } |
| 219 | |
| 220 | function importRawKey(isPublic, keyData, format, name, namedCurve) { |
| 221 | const handle = new KeyObjectHandle(); |
| 222 | const keyType = isPublic ? kKeyTypePublic : kKeyTypePrivate; |
| 223 | try { |
| 224 | handle.init(keyType, keyData, format, name ?? null, null, namedCurve ?? null); |
| 225 | } catch (err) { |
| 226 | throw lazyDOMException( |
| 227 | 'Invalid keyData', { name: 'DataError', cause: err }); |
| 228 | } |
| 229 | return handle; |
| 230 | } |
| 231 | |
| 232 | function importSecretKey(keyData) { |
| 233 | const handle = new KeyObjectHandle(); |
no test coverage detected
searching dependent graphs…