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

Function deserializeSessionKey

cli/src/cache/driveCryptoCacheAdapter.ts:194–203  ·  view source on GitHub ↗
(json: SerializedSessionKey)

Source from the content-addressed store, hash-verified

192}
193
194function deserializeSessionKey(json: SerializedSessionKey): SessionKey {
195 const output: SessionKey = {
196 data: new Uint8Array(Buffer.from(json.dataBase64, 'base64')),
197 algorithm: json.algorithm as unknown as SessionKey['algorithm'],
198 };
199 if (json.aeadAlgorithm !== undefined) {
200 output.aeadAlgorithm = json.aeadAlgorithm as unknown as NonNullable<SessionKey['aeadAlgorithm']>;
201 }
202 return output;
203}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected