aruu

[MIRROR] Actual replacement for Busybox | suckless
git clone https://git.daat.foo/aruu.git
Log | Files | Refs | README | LICENSE

sha384.h (514B)


      1 /* public domain sha512 implementation based on fips180-3 */
      2 
      3 #include "sha512.h"
      4 #include <stdint.h>
      5 
      6 #define sha384 sha512 /* struct */
      7 
      8 enum { SHA384_DIGEST_LENGTH = 48 };
      9 
     10 /* reset state */
     11 void sha384_init(void *ctx);
     12 /* process message */
     13 #define sha384_update sha512_update
     14 /* get message digest */
     15 /* state is ruined after sum, keep a copy if multiple sum is needed */
     16 /* part of the message might be left in s, zero it if secrecy is needed */
     17 void sha384_sum(void *ctx, uint8_t md[SHA384_DIGEST_LENGTH]);