From: John Kohl Date: Wed, 9 May 1990 14:43:27 +0000 (+0000) Subject: update to new cksum interface X-Git-Tag: krb5-1.0-alpha2~605 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d156945493e623a5a9cbcb260b12b92aad9df8b8;p=krb5.git update to new cksum interface git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@800 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/crypto/crc32/crc.c b/src/lib/crypto/crc32/crc.c index 4444b093e..0ce7589ba 100644 --- a/src/lib/crypto/crc32/crc.c +++ b/src/lib/crypto/crc32/crc.c @@ -89,23 +89,26 @@ static u_long const crc_table[256] = { }; static krb5_error_code -crc32_sum_func(in, out, seed, in_length, seed_length, outcksum) +crc32_sum_func(in, in_length, seed, seed_length, outcksum) krb5_pointer in; -krb5_pointer out; -krb5_pointer seed; size_t in_length; +krb5_pointer seed; size_t seed_length; krb5_checksum *outcksum; { - register u_char *data = (u_char *)in; + register u_char *data; register u_long c = 0; register int idx; int i; - outcksum->contents = (krb5_octet *)malloc(4); - if (!outcksum->contents) - return ENOMEM; - + data = (u_char *)seed; + for (i=0; i>= 8; + c ^= crc_table[idx]; + } + data = (u_char *)in; for (i=0; i