From 633cbe271460980ff18a350fb6b7864a424ec83a Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sat, 29 Oct 2022 04:36:00 +0530 Subject: feat(crypto-common): support passing arbitrary crypto options --- .../kotlin/app/passwordstore/crypto/PGPainlessCryptoHandlerTest.kt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crypto-pgpainless/src/test/kotlin') diff --git a/crypto-pgpainless/src/test/kotlin/app/passwordstore/crypto/PGPainlessCryptoHandlerTest.kt b/crypto-pgpainless/src/test/kotlin/app/passwordstore/crypto/PGPainlessCryptoHandlerTest.kt index 80c8dc7c..386ca72b 100644 --- a/crypto-pgpainless/src/test/kotlin/app/passwordstore/crypto/PGPainlessCryptoHandlerTest.kt +++ b/crypto-pgpainless/src/test/kotlin/app/passwordstore/crypto/PGPainlessCryptoHandlerTest.kt @@ -41,6 +41,7 @@ class PGPainlessCryptoHandlerTest { encryptionKey.keySet, CryptoConstants.PLAIN_TEXT.byteInputStream(Charsets.UTF_8), ciphertextStream, + PGPEncryptOptions.Builder().build(), ) assertIs>(encryptRes) val plaintextStream = ByteArrayOutputStream() @@ -50,6 +51,7 @@ class PGPainlessCryptoHandlerTest { CryptoConstants.KEY_PASSPHRASE, ciphertextStream.toByteArray().inputStream(), plaintextStream, + PGPDecryptOptions.Builder().build(), ) assertIs>(decryptRes) assertEquals(CryptoConstants.PLAIN_TEXT, plaintextStream.toString(Charsets.UTF_8)) @@ -63,6 +65,7 @@ class PGPainlessCryptoHandlerTest { encryptionKey.keySet, CryptoConstants.PLAIN_TEXT.byteInputStream(Charsets.UTF_8), ciphertextStream, + PGPEncryptOptions.Builder().build(), ) assertIs>(encryptRes) val plaintextStream = ByteArrayOutputStream() @@ -72,6 +75,7 @@ class PGPainlessCryptoHandlerTest { "very incorrect passphrase", ciphertextStream.toByteArray().inputStream(), plaintextStream, + PGPDecryptOptions.Builder().build(), ) assertIs>(result) assertIs(result.getError()) -- cgit v1.2.3