From 1e5e7b5d2aa6b192fa7ec9a0ee6b58acb5607f4a Mon Sep 17 00:00:00 2001 From: Hellblazer Date: Tue, 9 Jan 2024 18:31:09 -0800 Subject: [PATCH] error messages --- .../salesforce/apollo/cryptography/EncryptionAlgorithm.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cryptography/src/main/java/com/salesforce/apollo/cryptography/EncryptionAlgorithm.java b/cryptography/src/main/java/com/salesforce/apollo/cryptography/EncryptionAlgorithm.java index e0979c9a2..603ddb494 100644 --- a/cryptography/src/main/java/com/salesforce/apollo/cryptography/EncryptionAlgorithm.java +++ b/cryptography/src/main/java/com/salesforce/apollo/cryptography/EncryptionAlgorithm.java @@ -105,7 +105,7 @@ final public SecretKey decapsulate(PrivateKey privateKey, byte[] encapsulated, S var kem = KEM.getInstance(DHKEM); return kem.newDecapsulator(privateKey).decapsulate(encapsulated, 0, encapsulated.length, algorithm); } catch (NoSuchAlgorithmException | InvalidKeyException | DecapsulateException e) { - throw new IllegalArgumentException("Invalid public key", e); + throw new IllegalArgumentException("error decapsulating", e); } } @@ -114,7 +114,7 @@ final public KEM.Encapsulated encapsulated(PublicKey publicKey) { var kem = KEM.getInstance(DHKEM); return kem.newEncapsulator(publicKey).encapsulate(); } catch (NoSuchAlgorithmException | InvalidKeyException e) { - throw new IllegalArgumentException("Invalid public key", e); + throw new IllegalArgumentException("error encapsulating", e); } }