123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- #ifndef BLOCKWISE_H
- #define BLOCKWISE_H
- #include <stdint.h>
- #include <stddef.h>
- typedef void (*cf_blockwise_in_fn)(void *ctx, const uint8_t *data);
- typedef void (*cf_blockwise_out_fn)(void *ctx, uint8_t *data);
- void cf_blockwise_accumulate(uint8_t *partial, size_t *npartial,
- size_t nblock,
- const void *input, size_t nbytes,
- cf_blockwise_in_fn process,
- void *ctx);
- void cf_blockwise_accumulate_final(uint8_t *partial, size_t *npartial,
- size_t nblock,
- const void *input, size_t nbytes,
- cf_blockwise_in_fn process,
- cf_blockwise_in_fn process_final,
- void *ctx);
- void cf_blockwise_xor(uint8_t *partial, size_t *npartial,
- size_t nblock,
- const void *input, void *output, size_t nbytes,
- cf_blockwise_out_fn newblock,
- void *ctx);
- void cf_blockwise_acc_byte(uint8_t *partial, size_t *npartial,
- size_t nblock,
- uint8_t byte, size_t nbytes,
- cf_blockwise_in_fn process,
- void *ctx);
- void cf_blockwise_acc_pad(uint8_t *partial, size_t *npartial,
- size_t nblock,
- uint8_t fbyte, uint8_t mbyte, uint8_t lbyte,
- size_t nbytes,
- cf_blockwise_in_fn process,
- void *ctx);
- #endif
|