summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/sha2.c
AgeCommit message (Collapse)AuthorFilesLines
2012-01-07Use 32-bit wide integer type in PolarSSL codeDan McGee1-43/+44
A look at what this does on 64 bit systems since we were using the unnecessarily large 'unsigned long' type before even though it was 64 bits wide: $ ~/bin/bloat-o-meter libalpm.so.old lib/libalpm/.libs/libalpm.so add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-10412 (-10412) function old new delta md5_finish 370 356 -14 sha2_finish 547 531 -16 md5_process 3762 2643 -1119 sha2_process 20356 11093 -9263 The code size is nearly halved in the sha2 case (44% smaller code size), and md5 gets a nice size reduction (27% smaller) as well. We also move base64 code to <stdint.h> types as well; we can use 'uint32_t' rather than 'unsigned long' for at least two variables in the decode function. This doesn't net the same size benefit as the hash code case, but it is more proper. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-15Add sha2 (sha256) routines from PolarSSLDan McGee1-0/+369
Signed-off-by: Dan McGee <dan@archlinux.org>