(key)
| 673 | } |
| 674 | |
| 675 | function createPublicKey(key) { |
| 676 | const { format, type, data, passphrase, namedCurve } = |
| 677 | prepareAsymmetricKey(key, kCreatePublic); |
| 678 | const handle = new KeyObjectHandle(); |
| 679 | handle.init(kKeyTypePublic, data, format ?? null, |
| 680 | type ?? null, passphrase ?? null, namedCurve ?? null); |
| 681 | return new PublicKeyObject(handle); |
| 682 | } |
| 683 | |
| 684 | /** |
| 685 | * Converts a secret KeyObjectHandle to a CryptoKey by dispatching to the |
no test coverage detected
searching dependent graphs…