Added some macros for the checksum switch abstraction
authorTheodore Tso <tytso@mit.edu>
Fri, 18 Jan 1991 14:25:39 +0000 (14:25 +0000)
committerTheodore Tso <tytso@mit.edu>
Fri, 18 Jan 1991 14:25:39 +0000 (14:25 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1638 dc483132-0cff-0310-8789-dd5450dbe970

src/include/krb5/encryption.h

index 3230a1810e83300f9cde7131c8c82dc0478b968d..129565c766c8e444aafe186f91fd82a0bf47cfeb 100644 (file)
@@ -160,4 +160,10 @@ extern int krb5_max_cksum;         /* max entry in array */
 #define krb5_finish_random_key(eblock, ptr) (*(eblock)->crypto_entry->finish_random_key)(ptr)
 #define krb5_random_key(eblock, ptr, keyblock) (*(eblock)->crypto_entry->random_key)(ptr, keyblock)
 
+/*
+ * Here's the stuff for the checksum switch:
+ */
+#define krb5_checksum_size(ctype)  (krb5_cksumarray[CKSUMTYPE_CRC32]->checksum_length)
+#define krb5_calculate_checksum(ctype, in, in_length, seed, seed_length, outcksum) ((*krb5_cksumarray[CKSUMTYPE_CRC32]->sum_func)(in, in_length, seed, seed_length, outcksum))
+
 #endif /* KRB5_ENCRYPTION__ */