-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Impl secret key storage capability (#134)
- Loading branch information
1 parent
dea8f17
commit 8e0b527
Showing
27 changed files
with
338 additions
and
357 deletions.
There are no files selected for viewing
9 changes: 0 additions & 9 deletions
9
composeApp/src/commonMain/kotlin/com/clipevery/encrypt/CreateSignalProtocolState.kt
This file was deleted.
Oops, something went wrong.
35 changes: 0 additions & 35 deletions
35
composeApp/src/commonMain/kotlin/com/clipevery/encrypt/SignalProtocol.kt
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
composeApp/src/commonMain/kotlin/com/clipevery/encrypt/SignalProtocolFactory.kt
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
composeApp/src/commonMain/kotlin/com/clipevery/encrypt/SignalProtocolWithState.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
composeApp/src/commonMain/kotlin/com/clipevery/model/AppInfo.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
package com.clipevery.model | ||
|
||
const val AppName: String = "Clipevery" | ||
|
||
data class AppInfo( | ||
val appName: String = "Clipevery", | ||
val appInstanceId: String, | ||
val appVersion: String, | ||
val userName: String | ||
) |
5 changes: 4 additions & 1 deletion
5
composeApp/src/commonMain/kotlin/com/clipevery/model/SyncInfo.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
package com.clipevery.model | ||
|
||
import org.signal.libsignal.protocol.SignalProtocolAddress | ||
|
||
data class SyncInfo( | ||
val appInfo: AppInfo, | ||
val endpointInfo: EndpointInfo, | ||
val state: SyncState) | ||
val state: SyncState | ||
): SignalProtocolAddress(appInfo.appInstanceId, 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
composeApp/src/commonMain/sqldelight/com/clipevery/data/IdentityKey.sq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
CREATE TABLE identityKey ( | ||
app_instance_id TEXT NOT NULL PRIMARY KEY, | ||
registrationId INTEGER NOT NULL, | ||
serialized BLOB NOT NULL | ||
); | ||
|
||
select: | ||
SELECT * FROM identityKey WHERE app_instance_id = ?; | ||
|
||
tryInit: | ||
INSERT OR FAIL INTO identityKey (app_instance_id, registrationId, serialized) VALUES (?, ?, ?); | ||
|
||
update: | ||
UPDATE identityKey SET serialized = ? WHERE app_instance_id = ? AND registrationId = ?; | ||
|
16 changes: 16 additions & 0 deletions
16
composeApp/src/commonMain/sqldelight/com/clipevery/data/PreKey.sq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
CREATE TABLE preKey ( | ||
id INTEGER PRIMARY KEY, | ||
serialized BLOB NOT NULL | ||
); | ||
|
||
selectById: | ||
SELECT * FROM preKey WHERE id = ?; | ||
|
||
insert: | ||
INSERT OR REPLACE INTO preKey (id, serialized) VALUES (?, ?); | ||
|
||
count: | ||
SELECT count(1) FROM preKey WHERE id = ?; | ||
|
||
delete: | ||
DELETE FROM preKey WHERE id = ?; |
19 changes: 19 additions & 0 deletions
19
composeApp/src/commonMain/sqldelight/com/clipevery/data/SignedPreKey.sq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
CREATE TABLE signedPreKey ( | ||
id INTEGER PRIMARY KEY, | ||
serialized BLOB NOT NULL | ||
); | ||
|
||
selectById: | ||
SELECT * FROM signedPreKey WHERE id = ?; | ||
|
||
selectAll: | ||
SELECT * FROM signedPreKey; | ||
|
||
insert: | ||
INSERT OR REPLACE INTO signedPreKey (id, serialized) VALUES (?, ?); | ||
|
||
count: | ||
SELECT COUNT(*) FROM signedPreKey WHERE id = ?; | ||
|
||
delete: | ||
DELETE FROM signedPreKey WHERE id = ?; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 0 additions & 98 deletions
98
composeApp/src/desktopMain/kotlin/com/clipevery/encrypt/DesktopSignalProtocol.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.