2020-06-13 19:14:38 +02:00
|
|
|
package org.mercury_im.messenger.core.data.repository;
|
|
|
|
|
|
|
|
import org.bouncycastle.openpgp.PGPPublicKeyRingCollection;
|
2020-06-15 17:41:13 +02:00
|
|
|
import org.bouncycastle.openpgp.PGPSecretKeyRingCollection;
|
2020-06-13 19:14:38 +02:00
|
|
|
import org.jxmpp.jid.EntityBareJid;
|
|
|
|
|
2020-06-15 17:41:13 +02:00
|
|
|
import io.reactivex.Completable;
|
2020-06-13 19:14:38 +02:00
|
|
|
import io.reactivex.Single;
|
|
|
|
|
|
|
|
public interface OpenPgpRepository {
|
|
|
|
|
2020-06-15 17:41:13 +02:00
|
|
|
Completable storePublicKeysOf(EntityBareJid owner, PGPPublicKeyRingCollection keys);
|
|
|
|
|
|
|
|
Single<PGPPublicKeyRingCollection> loadPublicKeysOf(EntityBareJid owner);
|
|
|
|
|
|
|
|
Single<Integer> deletePublicKeysOf(EntityBareJid owner);
|
|
|
|
|
|
|
|
Completable storeSecretKeysOf(EntityBareJid owner, PGPSecretKeyRingCollection keys);
|
2020-06-13 19:14:38 +02:00
|
|
|
|
2020-06-15 17:41:13 +02:00
|
|
|
Single<PGPSecretKeyRingCollection> loadSecretKeysOf(EntityBareJid owner);
|
2020-06-13 19:14:38 +02:00
|
|
|
|
2020-06-15 17:41:13 +02:00
|
|
|
Single<Integer> deleteSecretKeysOf(EntityBareJid owner);
|
2020-06-13 19:14:38 +02:00
|
|
|
}
|