Skip to content

Commit

Permalink
chore(CC): update CoreCrypto to 1.0.1 (#2937) (#2963)
Browse files Browse the repository at this point in the history
Co-authored-by: Mojtaba Chenani <[email protected]>
Co-authored-by: Oussama Hassine <[email protected]>
  • Loading branch information
3 people committed Aug 23, 2024
1 parent 49582cd commit 6fec0a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ actual suspend fun coreCryptoCentral(
File(rootDir).mkdirs()
val coreCrypto = coreCryptoDeferredInit(
path = path,
key = databaseKey,
ciphersuites = emptyList(),
nbKeyPackage = null
key = databaseKey
)
coreCrypto.setCallbacks(Callbacks())
return CoreCryptoCentralImpl(
Expand All @@ -45,14 +43,13 @@ actual suspend fun coreCryptoCentral(
}

private class Callbacks : CoreCryptoCallbacks {

override fun authorize(conversationId: ByteArray, clientId: ClientId): Boolean {
override suspend fun authorize(conversationId: ByteArray, clientId: ClientId): Boolean {
// We always return true because our BE is currently enforcing that this constraint is always true
return true
}

override fun clientIsExistingGroupUser(
conversationId: ConversationId,
override suspend fun clientIsExistingGroupUser(
conversationId: ByteArray,
clientId: ClientId,
existingClients: List<ClientId>,
parentConversationClients: List<ClientId>?
Expand All @@ -61,11 +58,7 @@ private class Callbacks : CoreCryptoCallbacks {
return true
}

override fun userAuthorize(
conversationId: ConversationId,
externalClientId: ClientId,
existingClients: List<ClientId>
): Boolean {
override suspend fun userAuthorize(conversationId: ByteArray, externalClientId: ClientId, existingClients: List<ClientId>): Boolean {
// We always return true because our BE is currently enforcing that this constraint is always true
return true
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pbandk = "0.14.2"
turbine = "1.1.0"
avs = "9.8.15"
jna = "5.14.0"
core-crypto = "1.0.0-rc.56-hotfix.2"
core-crypto = "1.0.2"
core-crypto-multiplatform = "0.6.0-rc.3-multiplatform-pre1"
completeKotlin = "1.1.0"
desugar-jdk = "2.0.4"
Expand Down

0 comments on commit 6fec0a3

Please sign in to comment.