+/*----- Fetching key data conveniently ------------------------------------*/
+
+/* --- @key_fetchinit@ --- *
+ *
+ * Arguments: @const key_fetchdef *kf@ = pointer to base definition
+ * @key_packstruct *kps@ = pointer to destination packing def
+ * @void *p@ = pointer to destination block
+ *
+ * Returns: Pointer to packing definition.
+ *
+ * Use: Initializes a packing definition (@key_packdef@ structure).
+ * If @kps@ is null on entry, an appropriately sized block is
+ * allocated automatically. Otherwise it must be large enough.
+ */
+
+extern key_packdef *key_fetchinit(const key_fetchdef */*kf*/,
+ key_packstruct */*kp*/, void */*p*/);
+
+/* --- @key_fetch@ --- *
+ *
+ * Arguments: @key_packdef *kp@ = pointer to packing structure
+ * @key *k@ = key file containing desired key
+ *
+ * Returns: Error code, or zero.
+ *
+ * Use: Fetches an unpacked key from a packed one.
+ */
+
+extern int key_fetch(key_packdef */*kp*/, key */*k*/);
+
+/* --- @key_fetchbyname@ --- *
+ *
+ * Arguments: @key_packdef *kp@ = pointer to packing structure
+ * @key_file *kf@ = key file containing desired key
+ * @const char *tag@ = user's tag describing the key
+ *
+ * Returns: Error code, or zero.
+ *
+ * Use: Fetches a named key from a key file and unpacks it
+ * conveniently.
+ */
+
+extern int key_fetchbyname(key_packdef */*kp*/,
+ key_file */*kf*/, const char */*tag*/);
+
+/* --- @key_fetchdone@ --- *
+ *
+ * Arguments: @key_packdef *kp@ = pointer to packing structure
+ *
+ * Returns: ---
+ *
+ * Use: Frees a packing structure. If the structure was allocated by
+ * @key_fetchinit@ then it is freed.
+ */
+
+extern void key_fetchdone(key_packdef */*kp*/);
+