(keyData)
| 236 | } |
| 237 | |
| 238 | function importJwkSecretKey(keyData) { |
| 239 | const handle = new KeyObjectHandle(); |
| 240 | try { |
| 241 | handle.init(kKeyTypeSecret, keyData, kKeyFormatJWK, null, null); |
| 242 | } catch (err) { |
| 243 | throw lazyDOMException( |
| 244 | 'Invalid keyData', { name: 'DataError', cause: err }); |
| 245 | } |
| 246 | return handle; |
| 247 | } |
| 248 | |
| 249 | module.exports = { |
| 250 | createKeyUsages, |
no test coverage detected
searching dependent graphs…