modify string_to_key and sum_func signatures
authorJohn Kohl <jtkohl@mit.edu>
Mon, 5 Feb 1990 15:31:08 +0000 (15:31 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Mon, 5 Feb 1990 15:31:08 +0000 (15:31 +0000)
add cksumarray & valid_cksumtype

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@278 dc483132-0cff-0310-8789-dd5450dbe970

src/include/krb5/encryption.h

index 7a7f3832636de669c5f7664c67e0aed531366073..a792bce85582e39887d15299460c8b0cd4def4c5 100644 (file)
@@ -49,7 +49,8 @@ typedef struct _krb5_cryptosystem_entry {
                                              krb5_keyblock *));
     krb5_error_code (*finish_key) PROTOTYPE((krb5_encrypt_block *));
     krb5_error_code (*string_to_key) PROTOTYPE((krb5_keytype, krb5_keyblock *,
-                                               char *, krb5_principal *));
+                                               krb5_data *,
+                                               krb5_principal));
     krb5_error_code (*random_key) PROTOTYPE((krb5_pointer,
                                             krb5_keyblock **));
     krb5_error_code  (*init_random_key) PROTOTYPE((krb5_keyblock *,
@@ -68,10 +69,12 @@ typedef struct _krb5_cs_table_entry {
 
 /* could be used in a table to find a sumtype */
 typedef struct _krb5_checksum_entry {
-    krb5_pointer  (*sum_func) PROTOTYPE ((krb5_pointer in, krb5_pointer out,
-                                         krb5_pointer seed,
-                                         size_t in_length,
-                                         size_t seed_length));
+    krb5_error_code  (*sum_func) PROTOTYPE ((krb5_pointer /* in */,
+                                            krb5_pointer /* out */,
+                                            krb5_pointer /* seed */,
+                                            size_t /* in_length */,
+                                            size_t /* seed_length */,
+                                            krb5_checksum * /* out_cksum */));
     int checksum_length;               /* length of stuff returned by
                                           sum_func */
 } krb5_checksum_entry;
@@ -108,7 +111,12 @@ typedef struct _krb5_checksum_entry {
 extern krb5_cs_table_entry *krb5_csarray[];
 extern int krb5_max_cryptosystem;              /* max entry in array */
 
+extern krb5_checksum_entry *krb5_cksumarray[];
+extern int krb5_max_cksum;             /* max entry in array */
+
 #define valid_etype(etype)     ((etype <= krb5_max_cryptosystem) && (etype > 0) && krb5_csarray[etype])
 
+#define valid_cksumtype(cktype)     ((cktype <= krb5_max_cksum) && (cktype > 0) && krb5_cksumarray[cktype])
+
 
 #endif /* __KRB5_ENCRYPTION__ */