closed group encryption key pair

This commit is contained in:
Ryan ZHAO 2021-01-20 11:18:00 +11:00
parent 9df6bb11d1
commit 70456d0fd9
3 changed files with 6 additions and 6 deletions

View File

@ -321,11 +321,11 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
}
override fun getClosedGroupEncryptionKeyPairs(groupPublicKey: String): MutableList<ECKeyPair> {
TODO("Not yet implemented")
return DatabaseFactory.getLokiAPIDatabase(context).getClosedGroupEncryptionKeyPairs(groupPublicKey).toMutableList()
}
override fun getLatestClosedGroupEncryptionKeyPair(groupPublicKey: String): ECKeyPair {
TODO("Not yet implemented")
override fun getLatestClosedGroupEncryptionKeyPair(groupPublicKey: String): ECKeyPair? {
return DatabaseFactory.getLokiAPIDatabase(context).getLatestClosedGroupEncryptionKeyPair(groupPublicKey)
}
override fun setProfileSharing(address: Address, value: Boolean) {

View File

@ -16,7 +16,7 @@ import org.session.libsignal.service.loki.utilities.removing05PrefixIfNeeded
import org.session.libsignal.service.loki.utilities.toHexString
import org.thoughtcrime.securesms.crypto.IdentityKeyUtil
import org.thoughtcrime.securesms.util.Hex
import org.thoughtcrime.securesms.util.TextSecurePreferences
import org.session.libsession.utilities.TextSecurePreferences
import java.util.*
class LokiAPIDatabase(context: Context, helper: SQLCipherOpenHelper) : Database(context, helper), LokiAPIDatabaseProtocol {

View File

@ -103,8 +103,8 @@ interface StorageProtocol {
fun insertOutgoingInfoMessage(context: Context, groupID: String, type: SignalServiceProtos.GroupContext.Type, name: String,
members: Collection<String>, admins: Collection<String>, threadID: Long)
fun isClosedGroup(publicKey: String): Boolean
fun getClosedGroupEncryptionKeyPairs(groupPublicKey: String): MutableList<ECKeyPair> //TODO
fun getLatestClosedGroupEncryptionKeyPair(groupPublicKey: String): ECKeyPair //TODO
fun getClosedGroupEncryptionKeyPairs(groupPublicKey: String): MutableList<ECKeyPair>
fun getLatestClosedGroupEncryptionKeyPair(groupPublicKey: String): ECKeyPair?
// Settings
fun setProfileSharing(address: Address, value: Boolean)