kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

blake2b.h (661B)


      1 #ifndef KIT_DIST_BLAKE2B_H
      2 #define KIT_DIST_BLAKE2B_H
      3 
      4 #include <stddef.h>
      5 #include <stdint.h>
      6 
      7 #include "dist.h"
      8 #include "monocypher/monocypher.h"
      9 
     10 /* v2 package/content hash. Minisign signatures use their own 64-byte BLAKE2b
     11  * prehash path in minisig.c for stock minisign compatibility. */
     12 typedef struct DistBlake2b {
     13   crypto_blake2b_ctx ctx;
     14 } DistBlake2b;
     15 
     16 void dist_blake2b_init(DistBlake2b* s, size_t out_len);
     17 void dist_blake2b_update(DistBlake2b* s, const uint8_t* data, size_t len);
     18 void dist_blake2b_final(DistBlake2b* s, uint8_t* out);
     19 
     20 void dist_blake2b(uint8_t out[DIST_BLAKE2B_LEN], const uint8_t* data,
     21                   size_t len);
     22 
     23 #endif