Search in sources :

Example 1 with SecretKeyPassphraseCallback

use of org.jivesoftware.smackx.ox.callback.SecretKeyPassphraseCallback in project Smack by igniterealtime.

the class OpenPgpStoreTest method t00_store_protectorGetSet.

/*
    Generic
     */
@Test
public void t00_store_protectorGetSet() {
    openPgpStoreInstance1.setKeyRingProtector(new UnprotectedKeysProtector());
    assertNotNull(openPgpStoreInstance1.getKeyRingProtector());
    // TODO: Test method below
    openPgpStoreInstance1.setSecretKeyPassphraseCallback(new SecretKeyPassphraseCallback() {

        @Override
        public Passphrase onPassphraseNeeded(OpenPgpV4Fingerprint fingerprint) {
            return null;
        }
    });
}
Also used : UnprotectedKeysProtector(org.pgpainless.key.protection.UnprotectedKeysProtector) SecretKeyPassphraseCallback(org.jivesoftware.smackx.ox.callback.SecretKeyPassphraseCallback) Passphrase(org.pgpainless.util.Passphrase) OpenPgpV4Fingerprint(org.pgpainless.key.OpenPgpV4Fingerprint) Test(org.junit.Test)

Aggregations

SecretKeyPassphraseCallback (org.jivesoftware.smackx.ox.callback.SecretKeyPassphraseCallback)1 Test (org.junit.Test)1 OpenPgpV4Fingerprint (org.pgpainless.key.OpenPgpV4Fingerprint)1 UnprotectedKeysProtector (org.pgpainless.key.protection.UnprotectedKeysProtector)1 Passphrase (org.pgpainless.util.Passphrase)1