From: Theodore Tso Date: Fri, 18 Jan 1991 14:25:39 +0000 (+0000) Subject: Added some macros for the checksum switch abstraction X-Git-Tag: krb5-1.0-alpha4~334 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=241ac090f2a369aeb4b9144f1d2ab4f2c604ac41;p=krb5.git Added some macros for the checksum switch abstraction git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1638 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/include/krb5/encryption.h b/src/include/krb5/encryption.h index 3230a1810..129565c76 100644 --- a/src/include/krb5/encryption.h +++ b/src/include/krb5/encryption.h @@ -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__ */