Skip to main content

Function: requireMigrationEncryptionKey()

requireMigrationEncryptionKey(encryptionKey: Buffer<ArrayBufferLike> | undefined, errorMessage: string): Buffer

Defined in: electron/services/cloud/migrations/backupMigrationHelpers.ts:16

Ensures the migration encryption key exists when crypto operations are required.

Parameters

encryptionKey

Optional key provided by migration caller.

Buffer<ArrayBufferLike> | undefined

errorMessage

string

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global\_Objects/Error message to throw when the key is missing.

Returns

Buffer

The validated encryption key.