package org.jivesoftware.smackx.ikey.record;

import org.bouncycastle.openpgp.PGPSecretKeyRing;
import org.jivesoftware.smackx.ox.OpenPgpSecretKeyBackupPassphrase;
import org.jxmpp.jid.EntityBareJid;

import java.io.IOException;

public interface IkeyStore {

    IkeyRecord loadIkeyRecord(EntityBareJid jid) throws IOException;

    void storeIkeyRecord(EntityBareJid jid, IkeyRecord record) throws IOException;

    IkeyRecord loadContenderIkeyRecord(EntityBareJid jid) throws IOException;

    void storeContenderIkeyRecord(EntityBareJid jid, IkeyRecord element) throws IOException;

    void clearContenderIkeyRecord(EntityBareJid jid) throws IOException;

    PGPSecretKeyRing loadSecretKey();

    void storeSecretKey(PGPSecretKeyRing secretKey);

    OpenPgpSecretKeyBackupPassphrase loadBackupPassphrase();

    void storeBackupPassphrase(OpenPgpSecretKeyBackupPassphrase passphrase);
}
