diff options
Diffstat (limited to 'include/entropy.h')
| -rw-r--r-- | include/entropy.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/entropy.h b/include/entropy.h new file mode 100644 index 0000000..e246682 --- /dev/null +++ b/include/entropy.h @@ -0,0 +1,12 @@ +#include <stddef.h> + +#pragma once + +typedef struct entropy_ctx { + size_t freq[256]; + size_t total_bytes; +} entropy_ctx; + +void entropy_init(entropy_ctx *ctx); +void entropy_update(entropy_ctx *ctx, const unsigned char *buf, size_t len); +double entropy_final(entropy_ctx *ctx); |
