summaryrefslogtreecommitdiff
path: root/src/cipher-proto.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2013-09-07 10:06:46 +0200
committerWerner Koch <wk@gnupg.org>2013-09-20 17:41:19 +0200
commit722bfc1e5f2268453db62f38cc46b5ec6ef3adee (patch)
treea59265211609e084227958e308e1d3236c79fcbb /src/cipher-proto.h
parent64cd7ab93da7c95cc8aa320c61c6e29f9e2399c4 (diff)
downloadlibgcrypt-722bfc1e5f2268453db62f38cc46b5ec6ef3adee.tar.gz
pk: Move s-exp creation for gcry_pk_decrypt to the modules.
* cipher/pubkey.c (sexp_to_enc): Remove RET_MODERN arg and merge it into FLAGS. (gcry_pk_decrypt): Move result s-exp building into the modules. * src/cipher-proto.h (gcry_pk_decrypt_t): Add some args. * cipher/ecc.c (ecc_decrypt_raw): Change to return an s-exp. * cipher/elgamal.c (elg_decrypt): Ditto. * cipher/rsa.c (rsa_decrypt): Ditto. (rsa_blind, rsa_unblind): Merge into rsa_decrypt. This saves several extra MPI allocations. -- The extra args added to gcry_pk_decrypt_t are a temporary solution unti we move the input s-exp parsing also into the modules. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'src/cipher-proto.h')
-rw-r--r--src/cipher-proto.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cipher-proto.h b/src/cipher-proto.h
index 1285fe85..212857b8 100644
--- a/src/cipher-proto.h
+++ b/src/cipher-proto.h
@@ -67,10 +67,14 @@ typedef gcry_err_code_t (*gcry_pk_encrypt_t) (int algo,
/* Type for the pk_decrypt function. */
typedef gcry_err_code_t (*gcry_pk_decrypt_t) (int algo,
- gcry_mpi_t *result,
+ gcry_sexp_t *r_result,
gcry_mpi_t *data,
gcry_mpi_t *skey,
- int flags);
+ int flags,
+ enum pk_encoding encoding,
+ int hash_algo,
+ unsigned char *label,
+ size_t labellen);
/* Type for the pk_sign function. */
typedef gcry_err_code_t (*gcry_pk_sign_t) (int algo,