MCPcopy Index your code
hub / github.com/sourcebot-dev/sourcebot / deriveOAuthKey

Function deriveOAuthKey

packages/shared/src/crypto.ts:154–156  ·  view source on GitHub ↗
(authSecret: string, salt: Buffer)

Source from the content-addressed store, hash-verified

152type EncryptedOAuthToken = z.infer<typeof encryptedOAuthTokenSchema>;
153
154function deriveOAuthKey(authSecret: string, salt: Buffer): Buffer {
155 return crypto.pbkdf2Sync(authSecret, salt, 100000, 32, 'sha256');
156}
157
158function isOAuthTokenEncrypted(token: string): boolean {
159 try {

Callers 2

encryptOAuthTokenFunction · 0.85
decryptOAuthTokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected