svn rev #23445: trunk/src/lib/crypto/ crypto_tests/ krb/crc32/
ghudson@MIT.EDU
ghudson at MIT.EDU
Fri Dec 4 09:54:57 EST 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=23445
Commit By: ghudson
Log Message:
Remove CRC32_SHIFT4 code as we are unlikely to ever need it.
Changed Files:
U trunk/src/lib/crypto/crypto_tests/t_crc.c
U trunk/src/lib/crypto/krb/crc32/crc-32.h
U trunk/src/lib/crypto/krb/crc32/crc32.c
Modified: trunk/src/lib/crypto/crypto_tests/t_crc.c
===================================================================
--- trunk/src/lib/crypto/crypto_tests/t_crc.c 2009-12-04 05:12:35 UTC (rev 23444)
+++ trunk/src/lib/crypto/crypto_tests/t_crc.c 2009-12-04 14:54:57 UTC (rev 23445)
@@ -134,21 +134,6 @@
(long)(after.tms_cutime - before.tms_cutime),
(long)(after.tms_cstime - before.tms_cstime));
-#ifdef CRC32_SHIFT4
- times(&before);
- for (i = 0; i < nblk; i++) {
- cksum = 0;
- mit_crc32_shift4(block + i * blksiz, blksiz, &cksum);
- }
- times(&after);
- printf("shift-4 implementation, %d blocks of %d bytes:\n",
- nblk, blksiz);
- printf("\tu=%ld s=%ld cu=%ld cs=%ld\n",
- (long)(after.tms_utime - before.tms_utime),
- (long)(after.tms_stime - before.tms_stime),
- (long)(after.tms_cutime - before.tms_cutime),
- (long)(after.tms_cstime - before.tms_cstime));
-#endif
free(block);
}
Modified: trunk/src/lib/crypto/krb/crc32/crc-32.h
===================================================================
--- trunk/src/lib/crypto/krb/crc32/crc-32.h 2009-12-04 05:12:35 UTC (rev 23444)
+++ trunk/src/lib/crypto/krb/crc32/crc-32.h 2009-12-04 14:54:57 UTC (rev 23445)
@@ -64,10 +64,4 @@
void
mit_crc32 (krb5_pointer in, size_t in_length, unsigned long *c);
-#ifdef CRC32_SHIFT4
-void mit_crc32_shift4(krb5_pointer /* in */,
- size_t /* in_length */,
- unsigned long * /* cksum */);
-#endif
-
#endif /* KRB5_CRC32__ */
Modified: trunk/src/lib/crypto/krb/crc32/crc32.c
===================================================================
--- trunk/src/lib/crypto/krb/crc32/crc32.c 2009-12-04 05:12:35 UTC (rev 23444)
+++ trunk/src/lib/crypto/krb/crc32/crc32.c 2009-12-04 14:54:57 UTC (rev 23445)
@@ -165,29 +165,3 @@
*cksum = c;
}
-
-#ifdef CRC32_SHIFT4
-static unsigned long const tbl4[16] = {
- 0x00000000, 0x1db71064, 0x3b6e20c8, 0x26d930ac,
- 0x76dc4190, 0x6b6b51f4, 0x4db26158, 0x5005713c,
- 0xedb88320, 0xf00f9344, 0xd6d6a3e8, 0xcb61b38c,
- 0x9b64c2b0, 0x86d3d2d4, 0xa00ae278, 0xbdbdf21c
-};
-
-void
-mit_crc32_shift4(krb5_pointer in, size_t in_length, unsigned long *cksum)
-{
- register unsigned char *data, b;
- register unsigned long c = *cksum;
- size_t i;
-
- data = (u_char *)in;
- for (i = 0; i < in_length; i++) {
- b = data[i];
- c = (c >> 4) ^ tbl4[(b ^ c) & 0x0f];
- b >>= 4;
- c = (c >> 4) ^ tbl4[(b ^ c) & 0x0f];
- }
- *cksum = c;
-}
-#endif
More information about the cvs-krb5
mailing list