From b0f1bf4b779011893845bf1d72807be62e9db7d6 Mon Sep 17 00:00:00 2001 From: Thomas Fussell Date: Thu, 13 Apr 2017 22:31:44 -0400 Subject: [PATCH] include headers for memcpy and size_t in sha implementations --- samples/data/cafe.jpg | Bin 0 -> 10705 bytes source/detail/crypto/sha1-fast.c | 2 ++ source/detail/crypto/sha512.c | 2 ++ 3 files changed, 4 insertions(+) create mode 100644 samples/data/cafe.jpg diff --git a/samples/data/cafe.jpg b/samples/data/cafe.jpg new file mode 100644 index 0000000000000000000000000000000000000000..fe00f287178d2ebb37d49bf8f2a5193e3f13a7e2 GIT binary patch literal 10705 zcmb7p^;Z;5)c(RQ-6b8u(jeW95=+M}4I(8h9ZLyPf=aWL(j7~8h_rNfhoHzJDIp;6 z^7)?c`v<(wnKNh3+plBPAw#ToeCCg7Fym zUla(0LyU)u_qh9i#6vfL3>V-J@CRbB0x-!ifMggC{QxGwV|Kv*(gpl~;NSwVL0EV| zObq--yA&w^6XU;wF|jZ~*uY1x$3#F_WZ2|S0XP(_LQ0hSxKwPyubz0~ftACkMGU-> z@@c%odmcj>FaVGKkKF&u48X$10bv4h@c@rjNiqP&|04x~ut327Tpo$ZKu-Z!k|^_gPNZaLjwogU8!XH)ugpaJ4WI!^20^rAGNq$+28Am)SiPa$s zU{0SkD9oW6;)!!*yB5*~`&=wEdEuov``4K)Ra1mSXVA{TL#}neB=&yIdr_%tyEyzn z(~zyQhP9*a8(~ZsZ4zN7&I2GX;9fOwdjDvAKUkss8JUHhbesc$zPBM=X~LV@lf*U$ z0I}EFVGqc2v7q7%hljcSuB<7c;x%Y@wu#UAsYTOi$?^si?gqe?m)MNuvq z)LxBKsZb{=8hR6Qg`@kxd1t!Y?95KY^b~Yd30_{O_gsG~2**CaLbdM-0HtX1&aE3% z({zYVE0|YL9Ap%T&bA`~!@E#plTA9pazm4s=$*1JLN2Z52S-%IDeX}^ShD0+bQrQp z-LaMBbZsl2nZmL0db5%j{!PC(diPg@LdHdlWFc5Wl0xU!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`Cf<5XgIWCIt5D4n-c4dNH8?l^F0=8CZ>prl znde}O9F-3YX(>~VE>2r&#{bMlfSFt`?h!lzQRQ5UNc8hQjF8UuuC^m>E*hvQ@3{3` zCCr~%!s5mxTb&9C=#webZgp&PH>Po9i-J1x7)T40I)e4A6qDo)pa_L_LF_GTk#M{c zr{8JL19hqQ^{0G7=B|PwsiY$tAGmicJ3@cYK*GBdAvD19xdS;mEcsFjFRaoJ=u)$1l+cX@z8a7o(^M6qNgw zteMSLqE>j}n29=zZKS2mvRSVIAF|q=!qz{6y77`_M;j|jhF_Lke_F1-Gup_pS_qWH zW9ykqQL7>~IrMxOhm#>o24SeASy^>OpAw?&RsF6{Q!9FVJ$B)8jt+$LnBDzowcF#hJU^kQ`$a2xnWjny-vf*-nAWoikooK*4D zFy+h>=`VmsBNE-&2V+UdEYghG25{9}TYJ7NdEJELS&2&0KZfo{KXyUz^G9 z{6`X@V9${ti4RLeqr6(XY_{-R`kJBck@%?gNbYCiQf$>p2@uh~9%PMs6&l+p`92N{7E5@sB;o>uZcn_WWe251-3qYAfwz9OVXyOki zB~P3P6@TThXXC7XwQrBKi0)qRdxK~>-s6d#KZgtKuD$VjVxno^;3LXR)M2E>tm)u1 zTHDZowY-q63+Ze>!}|5Nc13dCX7BS)rdk=4I2*e$U4#}6Dr{1@)dWduJ|%3@ul&6# zfdBQmodga!q1Y*2L9y70fsAAI*cK8+Cz6Aw(%CwR-gfx-RfNg-8c_FPbxz0Qxbq8l S+0D#r2 #include +#include void sha1_compress(uint32_t state[5], const uint8_t block[64]) { diff --git a/source/detail/crypto/sha512.c b/source/detail/crypto/sha512.c index c20bdbb7..0d59e2c8 100644 --- a/source/detail/crypto/sha512.c +++ b/source/detail/crypto/sha512.c @@ -22,7 +22,9 @@ * Software. */ +#include #include +#include void sha512_compress(uint64_t state[8], const uint8_t block[128]) {