From d65fc88a149aa543c272f088febf21dad9c55cf8 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Tue, 14 Jun 2022 13:00:54 +0530 Subject: Reimplement PGPainless encryption logic (#1955) * crypto-pgpainless: reimplement encryption logic * crypto-pgpainless: add an explicit error type for empty keyset --- .../src/main/kotlin/dev/msfjarvis/aps/crypto/errors/CryptoException.kt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crypto-common/src/main') 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) -- cgit v1.2.3