Skip to main content

Function: derivePassphraseKey()

function derivePassphraseKey(args: {
passphrase: string;
salt: Buffer;
}): Promise<Buffer<ArrayBufferLike>>;

Defined in: electron/services/cloud/crypto/cloudCrypto.ts:80

Derives a 32-byte encryption key from a user passphrase.

Parameters

args

passphrase

string

salt

Buffer

Returns

Promise<Buffer<ArrayBufferLike>>

Remarks

Uses Node's scrypt KDF with conservative parameters to balance UX and security. The caller must provide a cryptographically random salt.