key-binary.c
[u/mdw/catacomb] / key.h
diff --git a/key.h b/key.h
index 8629a57..05ba9a3 100644 (file)
--- a/key.h
+++ b/key.h
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: key.h,v 1.9 2001/06/22 19:37:59 mdw Exp $
+ * $Id: key.h,v 1.10 2004/04/08 01:02:49 mdw Exp $
  *
  * Simple key management
  *
@@ -30,6 +30,9 @@
 /*----- Revision history --------------------------------------------------* 
  *
  * $Log: key.h,v $
+ * Revision 1.10  2004/04/08 01:02:49  mdw
+ * key-binary.c
+ *
  * Revision 1.9  2001/06/22 19:37:59  mdw
  * New interface to enquire whether a key has expired.
  *
 #  include "key-data.h"
 #endif
 
+#ifndef CATACOMB_GHASH_H
+#  include "ghash.h"
+#endif
+
 #ifndef CATACOMB_MP_H
 #  include "mp.h"
 #endif
@@ -200,6 +207,7 @@ enum {
   KERR_BADPASS = -10,                  /* Error decrypting locked key */
   KERR_WRONGTYPE = -11,                        /* Key has incorrect type */
   KERR_NOTFOUND = -12,                 /* Key couldn't be found */
+  KERR_BADATTR = -13,                  /* Malformed attribute name */
   KERR_MAX                             /* Largest possible error */
 };
 
@@ -420,6 +428,20 @@ extern int key_expire(key_file */*f*/, key */*k*/);
 
 extern int key_used(key_file */*f*/, key */*k*/, time_t /*t*/);
 
+/* --- @key_fingerprint@ --- *
+ *
+ * Arguments:  @key *k@ = the key to fingerprint
+ *             @ghash *h@ = the hash to use
+ *             @const key_filter *kf@ = filter to apply
+ *
+ * Returns:    Nonzero if the key slightly matched the filter.
+ *
+ * Use:                Updates the hash context with the key contents.
+ */
+
+extern int key_fingerprint(key */*k*/, ghash */*h*/,
+                          const key_filter */*kf*/);
+
 /*----- Setting and reading attributes ------------------------------------*/
 
 /* --- @key_chkident@ --- *