MCPcopy Create free account
hub / github.com/ConsortiumAI/Consortium / decrypt

Function decrypt

packages/consortium-cli/src/api/encryption.ts:154–160  ·  view source on GitHub ↗
(key: Uint8Array, variant: 'legacy' | 'dataKey', data: Uint8Array)

Source from the content-addressed store, hash-verified

152}
153
154export function decrypt(key: Uint8Array, variant: 'legacy' | 'dataKey', data: Uint8Array): any | null {
155 if (variant === 'legacy') {
156 return decryptLegacy(data, key);
157 } else {
158 return decryptWithDataKey(data, key);
159 }
160}
161
162/**
163 * Generate authentication challenge response

Callers 5

constructorMethod · 0.90
updateMetadataMethod · 0.90
updateAgentStateMethod · 0.90
getOrCreateSessionMethod · 0.90
handleRequestMethod · 0.90

Calls 2

decryptLegacyFunction · 0.70
decryptWithDataKeyFunction · 0.70

Tested by

no test coverage detected