8 #ifndef __DECAF_SHA512_H__ 9 #define __DECAF_SHA512_H__ 12 #include <sys/types.h> 26 uint64_t bytes_processed;
31 void DECAF_API_VIS decaf_sha512_init(decaf_sha512_ctx_t ctx) DECAF_NONNULL;
34 void DECAF_API_VIS decaf_sha512_update(decaf_sha512_ctx_t ctx,
const uint8_t *message,
size_t message_len) DECAF_NONNULL;
41 void DECAF_API_VIS decaf_sha512_final(decaf_sha512_ctx_t ctx, uint8_t *output,
size_t output_len) DECAF_NONNULL;
44 static inline void decaf_sha512_destroy(decaf_sha512_ctx_t ctx) {
54 static inline void decaf_sha512_hash(
57 const uint8_t *message,
60 decaf_sha512_ctx_t ctx;
61 decaf_sha512_init(ctx);
62 decaf_sha512_update(ctx,message,message_len);
63 decaf_sha512_final(ctx,output,output_len);
64 decaf_sha512_destroy(ctx);
Hash context for SHA-512.
Definition: sha512.h:22
void DECAF_API_VIS decaf_bzero(void *data, size_t size) DECAF_NONNULL
Overwrite data with zeros.
Common utility headers for Decaf library.