MCPcopy Index your code
hub / github.com/garrytan/gstack / deriveKey

Function deriveKey

browse/src/cookie-import-browser.ts:445–447  ·  view source on GitHub ↗
(password: string, iterations: number)

Source from the content-addressed store, hash-verified

443// ─── Internal: Keychain Access (async, 10s timeout) ─────────────
444
445function deriveKey(password: string, iterations: number): Buffer {
446 return crypto.pbkdf2Sync(password, 'saltysalt', iterations, 16, 'sha1');
447}
448
449function getCachedDerivedKey(cacheKey: string, password: string, iterations: number): Buffer {
450 const cached = keyCache.get(cacheKey);

Callers 1

getCachedDerivedKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected