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

Function getRandomBytes

packages/consortium-cli/src/api/encryption.ts:46–48  ·  view source on GitHub ↗
(size: number)

Source from the content-addressed store, hash-verified

44 * Generate secure random bytes
45 */
46export function getRandomBytes(size: number): Uint8Array {
47 return new Uint8Array(randomBytes(size))
48}
49
50export function libsodiumPublicKeyFromSecretKey(seed: Uint8Array): Uint8Array {
51 const hashedSeed = new Uint8Array(createHash('sha512').update(seed).digest());

Callers 5

getOrCreateSessionMethod · 0.90
encryptLegacyFunction · 0.70
encryptWithDataKeyFunction · 0.70
authChallengeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected