feat(mobile): legacyDeviceVault helper for per-device key probing

This commit is contained in:
byGalax
2026-05-16 16:41:18 +02:00
parent 69733168ed
commit 8c27e8eafa
+9
View File
@@ -0,0 +1,9 @@
import { secretStore } from './secretStore';
// During the migration window the orchestrator probes SecureStore for legacy
// per-device private keys. We keep this read-only — never write — so a future
// reset can safely wipe the new chatapp.userpriv.* slot without affecting
// pre-existing legacy entries.
export function legacyDeviceKey(userId: string, deviceId: string): Promise<Uint8Array | null> {
return secretStore.getSecret('chatapp.priv.' + userId + '.' + deviceId);
}