diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2014-05-16 13:45:44 -0600 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2014-05-16 13:45:44 -0600 |
commit | e4d8847eee14ddfa9632057bca36cb60dfa1b35f (patch) | |
tree | ac19da7960b8cc8078a2510bd5b4df3e5988680c /src/fchash.c | |
parent | 48c8b7938a0f1412d31dbe2f4e332e460f624068 (diff) | |
download | fontconfig-e4d8847eee14ddfa9632057bca36cb60dfa1b35f.tar.gz |
Remove unused code
Diffstat (limited to 'src/fchash.c')
-rw-r--r-- | src/fchash.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/fchash.c b/src/fchash.c index 3830002..ede41d2 100644 --- a/src/fchash.c +++ b/src/fchash.c @@ -160,47 +160,6 @@ FcHashSHA256ToString (FcChar32 *hash) } 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) { FILE *fp = fopen ((const char *)filename, "rb"); |