1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-09-13 20:29:39 +02:00

Introduce ImplementationFactory

This commit is contained in:
Paul Schaub 2020-12-27 01:56:18 +01:00
parent c7ede0fc8a
commit 1c1f9d49ab
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
22 changed files with 655 additions and 91 deletions

View file

@ -21,6 +21,7 @@ import static org.junit.jupiter.api.Assertions.assertNull;
import javax.annotation.Nullable;
import org.bouncycastle.openpgp.PGPException;
import org.bouncycastle.openpgp.PGPSecretKey;
import org.junit.jupiter.api.Test;
import org.pgpainless.key.TestKeys;
import org.pgpainless.key.protection.passphrase_provider.SecretKeyPassphraseProvider;
@ -37,7 +38,7 @@ public class PassphraseProtectedKeyTest {
@Nullable
@Override
public Passphrase getPassphraseFor(Long keyId) {
if (keyId == TestKeys.CRYPTIE_KEY_ID) {
if (keyId.equals(TestKeys.CRYPTIE_KEY_ID)) {
return new Passphrase(TestKeys.CRYPTIE_PASSWORD.toCharArray());
} else {
return null;