From 18201ac248a408aac7767e27caefb98b66332189 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Sat, 19 Sep 2026 12:22:08 +0300 Subject: [PATCH] Switch all clients to the new `.highEntropyPassphrase` mechanism. Which will automatically migrate the existing passphrase and allow us to later switch directly to the raw key everywhere. More details on https://github.com/matrix-org/matrix-rust-sdk/pull/6878 --- ElementX/Sources/Services/Client/ClientFactory.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ElementX/Sources/Services/Client/ClientFactory.swift b/ElementX/Sources/Services/Client/ClientFactory.swift index 275386a1f..5b804c3e9 100644 --- a/ElementX/Sources/Services/Client/ClientFactory.swift +++ b/ElementX/Sources/Services/Client/ClientFactory.swift @@ -28,7 +28,7 @@ nonisolated struct ClientFactory: ClientFactoryProtocol { threadsEnabled: appSettings.threadsEnabled) .enableAutomaticBackPagination(enableAutomaticBackPagination: true) .sqliteStore(config: .init(dataPath: sessionDirectories.dataPath, cachePath: sessionDirectories.cachePath) - .passphrase(passphrase: passphrase)) + .highEntropyPassphrase(passphrase: Data(base64Encoded: passphrase), base64Variant: .padded)) .serverNameOrHomeserverUrl(serverNameOrUrl: serverNameOrBaseURL) return try await build(builder, for: .authentication, appHooks: appHooks) @@ -67,7 +67,7 @@ nonisolated struct ClientFactory: ClientFactoryProtocol { .enableAutomaticBackPagination(enableAutomaticBackPagination: true) .sqliteStore(config: .init(dataPath: credentials.restorationToken.sessionDirectories.dataPath, cachePath: credentials.restorationToken.sessionDirectories.cachePath) - .passphrase(passphrase: credentials.restorationToken.passphrase)) + .highEntropyPassphrase(passphrase: Data(base64Encoded: credentials.restorationToken.passphrase), base64Variant: .padded)) .withSearchIndexStore(path: credentials.restorationToken.sessionDirectories.dataPath, password: credentials.restorationToken.passphrase) .homeserverUrl(url: homeserverURL) @@ -95,7 +95,7 @@ nonisolated struct ClientFactory: ClientFactoryProtocol { .systemIsMemoryConstrained() .sqliteStore(config: .init(dataPath: credentials.restorationToken.sessionDirectories.dataPath, cachePath: credentials.restorationToken.sessionDirectories.cachePath) - .passphrase(passphrase: credentials.restorationToken.passphrase)) + .highEntropyPassphrase(passphrase: Data(base64Encoded: credentials.restorationToken.passphrase), base64Variant: .padded)) .homeserverUrl(url: homeserverURL) return try await build(builder, for: .restoration(credentials.restorationToken.session, .one(roomId: roomID)), appHooks: appHooks)