From 241ac090f2a369aeb4b9144f1d2ab4f2c604ac41 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Fri, 18 Jan 1991 14:25:39 +0000 Subject: [PATCH] Added some macros for the checksum switch abstraction git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1638 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/krb5/encryption.h | 6 ++++++ 1 file changed, 6 insertions(+) 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__ */ -- 2.26.2