Go to the documentation of this file. 25 #define CRYPTO_HASH_ENGINE(class_, name_, hashsize_, statesize_, blocksize_, INIT) \ 26 class class_##Engine \ 29 static constexpr const char* name = #name_; \ 30 static constexpr size_t hashsize = hashsize_; \ 31 static constexpr size_t statesize = statesize_; \ 32 static constexpr size_t blocksize = blocksize_; \ 36 void update(const void* data, size_t size) \ 38 CRYPTO_NAME(name_, update)(&ctx, static_cast<const uint8_t*>(data), size); \ 41 void final(uint8_t* hash) \ 43 CRYPTO_NAME(name_, final)(hash, &ctx); \ 47 CRYPTO_CTX(name_) ctx; \ 53 #define CRYPTO_HASH_ENGINE_STD(class_, name_, hashsize_, statesize_, blocksize_) \ 54 CRYPTO_HASH_ENGINE(class_, name_, hashsize_, statesize_, blocksize_, CRYPTO_HASH_ENGINE_STD_INIT) 59 #define CRYPTO_HASH_ENGINE_STD_INIT(name_) \ 62 CRYPTO_NAME(name_, init)(&ctx); \ 65 uint64_t get_state(void* state) \ 67 return CRYPTO_NAME(name_, get_state)(&ctx, state); \ 70 void set_state(const void* state, uint64_t count) \ 72 CRYPTO_NAME(name_, set_state)(&ctx, state, count); \