(key, keyUsages)
| 1331 | } |
| 1332 | |
| 1333 | function getPublicKeyImpl(key, keyUsages) { |
| 1334 | emitExperimentalWarning('The getPublicKey Web Crypto API method'); |
| 1335 | const prefix = prepareSubtleMethod(this, 'getPublicKey', arguments.length, 2); |
| 1336 | let i = 0; |
| 1337 | key = convertSubtleArgument(prefix, 'CryptoKey', key, i++); |
| 1338 | const usages = convertSubtleArgument( |
| 1339 | prefix, 'sequence<KeyUsage>', keyUsages, i++); |
| 1340 | |
| 1341 | const type = getCryptoKeyType(key); |
| 1342 | if (type !== 'private') |
| 1343 | throw lazyDOMException('key must be a private key', |
| 1344 | type === 'secret' ? 'NotSupportedError' : 'InvalidAccessError'); |
| 1345 | |
| 1346 | return toPublicCryptoKey(key, usages); |
| 1347 | } |
| 1348 | |
| 1349 | function encapsulateBits(encapsulationAlgorithm, encapsulationKey) { |
| 1350 | return callSubtleCryptoMethod(encapsulateBitsImpl, this, arguments); |
nothing calls this directly
no test coverage detected
searching dependent graphs…