001// SPDX-FileCopyrightText: 2021 Paul Schaub <vanitasvitae@fsfe.org>
002//
003// SPDX-License-Identifier: Apache-2.0
004
005package org.pgpainless.exception;
006
007import org.bouncycastle.openpgp.PGPException;
008
009public class WrongPassphraseException extends PGPException {
010
011    public WrongPassphraseException(String message) {
012        super(message);
013    }
014
015    public WrongPassphraseException(long keyId, PGPException cause) {
016        this("Wrong passphrase provided for key " + Long.toHexString(keyId), cause);
017    }
018
019    public WrongPassphraseException(String message, PGPException cause) {
020        super(message, cause);
021    }
022}