From aac74ae4515aa1d746f46287029441f5a945c98e Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sat, 23 Oct 2021 17:02:50 +0530 Subject: Switch new PGP backend to use PGPainless (#1522) * crypto-pgpainless: init * crypto-pgpainless: add an opinionated CryptoHandler impl * app: migrate to crypto-pgpainless * crypto-pgp: remove * github: remove now unused instrumentation tests job * crypto-common: fixup package names * wip(crypto-pgpainless): add `PGPKeyPair` and `PGPKeyManager` Signed-off-by: Aditya Wasan (cherry picked from commit 02d07e9e797a8600cc8c534a731dfffcc44cfdde) * crypto-pgpainless: use hex-encoded key IDs * crypto-pgpainless: replace legacy Gopenpgp-generated key file * crypto-pgpainless: fix CryptoConstants source set * crypto-pgpainless: fix tests * crypto-pgpainless: reinstate PGPKeyManager tests Co-authored-by: Aditya Wasan --- crypto-pgpainless/api/crypto-pgpainless.api | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 crypto-pgpainless/api/crypto-pgpainless.api (limited to 'crypto-pgpainless/api') diff --git a/crypto-pgpainless/api/crypto-pgpainless.api b/crypto-pgpainless/api/crypto-pgpainless.api new file mode 100644 index 00000000..1c59ca1f --- /dev/null +++ b/crypto-pgpainless/api/crypto-pgpainless.api @@ -0,0 +1,31 @@ +public final class dev/msfjarvis/aps/crypto/PGPKeyManager : dev/msfjarvis/aps/crypto/KeyManager { + public static final field Companion Ldev/msfjarvis/aps/crypto/PGPKeyManager$Companion; + public fun (Ljava/lang/String;Lkotlinx/coroutines/CoroutineDispatcher;)V + public synthetic fun addKey (Ldev/msfjarvis/aps/crypto/KeyPair;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; + public fun addKey (Ldev/msfjarvis/aps/crypto/PGPKeyPair;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; + public fun canHandle (Ljava/lang/String;)Z + public fun getAllKeys (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public fun getKeyById (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun makeKey (Ljava/lang/String;)Ldev/msfjarvis/aps/crypto/PGPKeyPair; + public synthetic fun removeKey (Ldev/msfjarvis/aps/crypto/KeyPair;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public fun removeKey (Ldev/msfjarvis/aps/crypto/PGPKeyPair;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; +} + +public final class dev/msfjarvis/aps/crypto/PGPKeyManager$Companion { + public final fun makeKey (Ljava/lang/String;)Ldev/msfjarvis/aps/crypto/PGPKeyPair; +} + +public final class dev/msfjarvis/aps/crypto/PGPKeyPair : dev/msfjarvis/aps/crypto/KeyPair { + public fun (Lorg/bouncycastle/openpgp/PGPSecretKey;)V + public fun getKeyId ()Ljava/lang/String; + public fun getPrivateKey ()[B + public fun getPublicKey ()[B +} + +public final class dev/msfjarvis/aps/crypto/PGPainlessCryptoHandler : dev/msfjarvis/aps/crypto/CryptoHandler { + public fun ()V + public fun canHandle (Ljava/lang/String;)Z + public fun decrypt (Ljava/lang/String;Ljava/lang/String;Ljava/io/InputStream;Ljava/io/OutputStream;)V + public fun encrypt (Ljava/util/List;Ljava/io/InputStream;Ljava/io/OutputStream;)V +} + -- cgit v1.2.3