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

Function expectSamePrivateKeys

cli/src/cache/driveCryptoCacheAdapter.test.ts:183–189  ·  view source on GitHub ↗
(a: CachedPrivateKey, b: CachedPrivateKey)

Source from the content-addressed store, hash-verified

181}
182
183async function expectSamePrivateKeys(a: CachedPrivateKey, b: CachedPrivateKey) {
184 const [ea, eb] = await Promise.all([
185 CryptoProxy.exportPrivateKey({ privateKey: a, passphrase: null }),
186 CryptoProxy.exportPrivateKey({ privateKey: b, passphrase: null }),
187 ]);
188 expect(ea).toBe(eb);
189}
190
191function expectSameSessionKeys(a: SessionKey, b: SessionKey) {
192 expect(Buffer.from(a.data).equals(Buffer.from(b.data))).toBe(true);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected