Add checksum verifier dispatch in checksum entry
authorPaul Park <pjpark@mit.edu>
Fri, 7 Jul 1995 20:55:05 +0000 (20:55 +0000)
committerPaul Park <pjpark@mit.edu>
Fri, 7 Jul 1995 20:55:05 +0000 (20:55 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6246 dc483132-0cff-0310-8789-dd5450dbe970

src/include/ChangeLog
src/include/krb5.hin

index 6d39c62314350344e9f4efa9a35b595c1cf5573c..9235c7533ad3dc5b5162a33debd3a1480dd6d85a 100644 (file)
@@ -1,3 +1,9 @@
+
+Fri Jul 7 15:56:49 EDT 1995    Paul Park       (pjpark@mit.edu)
+       * krb5.hin - Add checksum verifier dispatch in the checksum entry.
+               This is now the supported method for verifying checksums.  Also
+               add krb5_verify_checksum which uses this dispatch.
+
 Thu Jul  6 17:19:26 1995  Tom Yu  <tlyu@lothlorien.MIT.EDU>
 
        * krb5.hin: Change definition of krb5_os_localaddr to include
index f750acb695b6baa754cac1c60a7fea425efc3d0f..ada092c4d4d3b562c5c134a92b969501af2ab0e8 100644 (file)
@@ -361,9 +361,17 @@ typedef krb5_error_code  (*SUM_FUNC) KRB5_NPROTOTYPE (
                        size_t /* key/seed size */,
                        krb5_checksum FAR * /* out_cksum */));
 
+typedef krb5_error_code  (*SUM_VERF_FUNC) KRB5_NPROTOTYPE (
+                       (krb5_checksum FAR * /* out_cksum */,
+                       krb5_pointer /* in */,
+                       size_t /* in_length */,
+                       krb5_pointer /* key/seed */,
+                       size_t /* key/seed size */));
+
 typedef struct _krb5_checksum_entry {
     krb5_magic magic;
-    SUM_FUNC sum_func;
+    SUM_FUNC sum_func;                 /* Checksum generator */
+    SUM_VERF_FUNC sum_verf_func;       /* Verifier of checksum */
     int checksum_length;               /* length of stuff returned by
                                           sum_func */
     unsigned int is_collision_proof:1;
@@ -451,6 +459,7 @@ extern int krb5_max_cksum;          /* max entry in array */
  */
 #define krb5_checksum_size(context, ctype)  (krb5_cksumarray[ctype]->checksum_length)
 #define krb5_calculate_checksum(context, ctype, in, in_length, seed, seed_length, outcksum) ((*krb5_cksumarray[ctype]->sum_func)(in, in_length, seed, seed_length, outcksum))
+#define krb5_verify_checksum(context, ctype, cksum, in, in_length, seed, seed_length) ((*krb5_cksumarray[ctype]->sum_verf_func)(cksum, in, in_length, seed, seed_length))
 
 /*
  * end "encryption.h"