aboutsummaryrefslogtreecommitdiff
path: root/crypto-common
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2022-06-14 13:00:54 +0530
committerGitHub <noreply@github.com>2022-06-14 07:30:54 +0000
commitd65fc88a149aa543c272f088febf21dad9c55cf8 (patch)
treec5f1b2c6df2018e2ff22cb7bfd0007568db87ac7 /crypto-common
parent2ba3a086229ac46eb5287716e434b5bd32ea6d2a (diff)
Reimplement PGPainless encryption logic (#1955)
* crypto-pgpainless: reimplement encryption logic * crypto-pgpainless: add an explicit error type for empty keyset
Diffstat (limited to 'crypto-common')
-rw-r--r--crypto-common/src/main/kotlin/dev/msfjarvis/aps/crypto/errors/CryptoException.kt3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto-common/src/main/kotlin/dev/msfjarvis/aps/crypto/errors/CryptoException.kt b/crypto-common/src/main/kotlin/dev/msfjarvis/aps/crypto/errors/CryptoException.kt
index aee23710..b795bbf1 100644
--- a/crypto-common/src/main/kotlin/dev/msfjarvis/aps/crypto/errors/CryptoException.kt
+++ b/crypto-common/src/main/kotlin/dev/msfjarvis/aps/crypto/errors/CryptoException.kt
@@ -37,5 +37,8 @@ public sealed class CryptoHandlerException(message: String? = null, cause: Throw
/** The passphrase provided for decryption was incorrect. */
public class IncorrectPassphraseException(cause: Throwable) : CryptoHandlerException(null, cause)
+/** No keys were provided for encryption. */
+public class NoKeysProvided(message: String?) : CryptoHandlerException(message, null)
+
/** An unexpected error that cannot be mapped to a known type. */
public class UnknownError(cause: Throwable) : CryptoHandlerException(null, cause)