aboutsummaryrefslogtreecommitdiffstats
path: root/common/openpgpdefs.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2019-03-18 18:41:07 +0000
committerWerner Koch <[email protected]>2019-03-18 18:41:07 +0000
commita52d883fdbe6e0de8cb26f9c6aedf01a7f66cbe7 (patch)
treee59dfb41b24a12c314dbd1137637366315ac1453 /common/openpgpdefs.h
parentkbx: Add framework for a public key daemon. (diff)
parentspeedo: Fix installer build with NSIS-3 (diff)
downloadgnupg-a52d883fdbe6e0de8cb26f9c6aedf01a7f66cbe7.tar.gz
gnupg-a52d883fdbe6e0de8cb26f9c6aedf01a7f66cbe7.zip
Merge branch 'master' into switch-to-gpgk
--
Diffstat (limited to 'common/openpgpdefs.h')
-rw-r--r--common/openpgpdefs.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/common/openpgpdefs.h b/common/openpgpdefs.h
index 8699a178d..2f7ff456e 100644
--- a/common/openpgpdefs.h
+++ b/common/openpgpdefs.h
@@ -196,5 +196,19 @@ typedef enum
}
compress_algo_t;
+/* Limits to be used for static arrays. */
+#define OPENPGP_MAX_NPKEY 5 /* Maximum number of public key parameters. */
+#define OPENPGP_MAX_NSKEY 7 /* Maximum number of secret key parameters. */
+#define OPENPGP_MAX_NSIG 2 /* Maximum number of signature parameters. */
+#define OPENPGP_MAX_NENC 2 /* Maximum number of encryption parameters. */
+
+
+/* Decode an rfc4880 encoded S2K count. */
+#define S2K_DECODE_COUNT(_val) ((16ul + ((_val) & 15)) << (((_val) >> 4) + 6))
+
+
+/*--openpgp-s2k.c --*/
+unsigned char encode_s2k_iterations (int iterations);
+
#endif /*GNUPG_COMMON_OPENPGPDEFS_H*/