MCPcopy Create free account
hub / github.com/ProtonDriveApps/sdk / generateSessionKey

Function generateSessionKey

cli/src/cache/driveCryptoCacheAdapter.test.ts:176–181  ·  view source on GitHub ↗
(recipientPrivateKey: Awaited<ReturnType<typeof generatePrivateKey>>)

Source from the content-addressed store, hash-verified

174}
175
176async 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
183async function expectSamePrivateKeys(a: CachedPrivateKey, b: CachedPrivateKey) {
184 const [ea, eb] = await Promise.all([

Callers 1

Calls 1

generateSessionKeyMethod · 0.80

Tested by

no test coverage detected