(recipientPrivateKey: Awaited<ReturnType<typeof generatePrivateKey>>)
| 174 | } |
| 175 | |
| 176 | async function generateSessionKey(recipientPrivateKey: Awaited<ReturnType<typeof generatePrivateKey>>) { |
| 177 | const publicKey = await CryptoProxy.importPublicKey({ |
| 178 | binaryKey: await CryptoProxy.exportPublicKey({ key: recipientPrivateKey, format: 'binary' }), |
| 179 | }); |
| 180 | return CryptoProxy.generateSessionKey({ recipientKeys: publicKey }); |
| 181 | } |
| 182 | |
| 183 | async function expectSamePrivateKeys(a: CachedPrivateKey, b: CachedPrivateKey) { |
| 184 | const [ea, eb] = await Promise.all([ |
no test coverage detected