aboutsummaryrefslogtreecommitdiffstats
path: root/common/openpgpdefs.h
diff options
context:
space:
mode:
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*/