org.pgpainless.exception.MissingPassphraseException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pgpainless-core Show documentation
Show all versions of pgpainless-core Show documentation
Simple to use OpenPGP API for Java based on Bouncycastle
// SPDX-FileCopyrightText: 2021 Paul Schaub
//
// SPDX-License-Identifier: Apache-2.0
package org.pgpainless.exception;
import java.util.Arrays;
import java.util.Collections;
import java.util.Set;
import org.bouncycastle.openpgp.PGPException;
import org.pgpainless.key.SubkeyIdentifier;
public class MissingPassphraseException extends PGPException {
private final Set keyIds;
public MissingPassphraseException(Set keyIds) {
super("Missing passphrase encountered for keys " + Arrays.toString(keyIds.toArray()));
this.keyIds = Collections.unmodifiableSet(keyIds);
}
public Set getKeyIds() {
return keyIds;
}
}