Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/store-sqlite / encryption / resolvePassphrase

Function: resolvePassphrase()

ts
function resolvePassphrase(config): Promise<string>;

Defined in: packages/store-sqlite/src/encryption/index.ts:102

Resolves the configured passphrase to a SQL-literal-ready value suitable for PRAGMA key = <literal>. UTF-8 passphrases are returned as a single-quoted SQL string with internal ' doubled; binary keys are returned in the cipher peer's hex form (x'<hex>').

Parameters

ParameterType
configEncryptionConfig

Returns

Promise&lt;string&gt;

Stable