From e4d8847eee14ddfa9632057bca36cb60dfa1b35f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 16 May 2014 13:45:44 -0600 Subject: [PATCH] Remove unused code --- src/fchash.c | 41 ----------------------------------------- src/fcint.h | 4 ---- 2 files changed, 45 deletions(-) diff --git a/src/fchash.c b/src/fchash.c index 3830002..ede41d2 100644 --- a/src/fchash.c +++ b/src/fchash.c @@ -159,47 +159,6 @@ FcHashSHA256ToString (FcChar32 *hash) return ret; } -FcChar8 * -FcHashGetSHA256Digest (const FcChar8 *input_strings, - size_t len) -{ - size_t i, round_len = len / 64; - char block[64]; - FcChar32 *ret = FcHashInitSHA256Digest (); - - if (!ret) - return NULL; - - for (i = 0; i < round_len; i++) - { - FcHashComputeSHA256Digest (ret, (const char *)&input_strings[i * 64]); - } - /* padding */ - if ((len % 64) != 0) - memcpy (block, &input_strings[len / 64], len % 64); - memset (&block[len % 64], 0, 64 - (len % 64)); - block[len % 64] = 0x80; - if ((64 - (len % 64)) < 9) - { - /* process a block once */ - FcHashComputeSHA256Digest (ret, block); - memset (block, 0, 64); - } - /* set input size at the end */ - len *= 8; - block[63 - 0] = (uint64_t)len & 0xff; - block[63 - 1] = ((uint64_t)len >> 8) & 0xff; - block[63 - 2] = ((uint64_t)len >> 16) & 0xff; - block[63 - 3] = ((uint64_t)len >> 24) & 0xff; - block[63 - 4] = ((uint64_t)len >> 32) & 0xff; - block[63 - 5] = ((uint64_t)len >> 40) & 0xff; - block[63 - 6] = ((uint64_t)len >> 48) & 0xff; - block[63 - 7] = ((uint64_t)len >> 56) & 0xff; - FcHashComputeSHA256Digest (ret, block); - - return FcHashSHA256ToString (ret); -} - FcChar8 * FcHashGetSHA256DigestFromFile (const FcChar8 *filename) { diff --git a/src/fcint.h b/src/fcint.h index 3950e01..094e6e0 100644 --- a/src/fcint.h +++ b/src/fcint.h @@ -867,10 +867,6 @@ FcPrivate FcFontSet * FcFontSetDeserialize (const FcFontSet *set); /* fchash.c */ -FcPrivate FcChar8 * -FcHashGetSHA256Digest (const FcChar8 *input_strings, - size_t len); - FcPrivate FcChar8 * FcHashGetSHA256DigestFromFile (const FcChar8 *filename);