]> git.cryptolib.org Git - avr-crypto-lib.git/blob - twister/twister-large.h
adjusting test system uart reference
[avr-crypto-lib.git] / twister / twister-large.h
1 /* twister-large.h */
2
3 #ifndef TWISTER_large_H_
4 #define TWISTER_large_H_
5
6 #include <stdint.h>
7 #include "twister.h"
8
9 typedef uint8_t twister384_hash_t[384/8];
10 typedef uint8_t twister512_hash_t[512/8];
11
12 typedef struct {
13         twister_state_t    state;
14         twister_checksum_t checksum;
15 } twister_large_ctx_t;
16
17 typedef twister_large_ctx_t twister384_ctx_t;
18 typedef twister_large_ctx_t twister512_ctx_t;
19
20 /*********************************************************************/
21
22 void twister_large_nextBlock(twister_large_ctx_t *ctx, const void *msg);
23 void twister_large_init(twister_large_ctx_t *ctx, uint16_t hashsize_b);
24 void twister_large_lastBlock(twister_large_ctx_t *ctx, const void *msg, uint16_t length_b);
25 void twister_large_ctx2hash(void *dest, twister_large_ctx_t *ctx, uint16_t hashsize_b);
26
27 /*********************************************************************/
28
29 void twister384_init(twister384_ctx_t *ctx);
30 void twister384_nextBlock(twister384_ctx_t *ctx, const void *msg);
31 void twister384_lastBlock(twister384_ctx_t *ctx, const void *msg, uint16_t length_b);
32 void twister384_ctx2hash(void *dest, twister384_ctx_t *ctx);
33 void twister384(void *dest, const void *msg, uint32_t msg_length_b);
34
35 /*********************************************************************/
36
37 void twister512_init(twister512_ctx_t *ctx);
38 void twister512_nextBlock(twister512_ctx_t *ctx, const void *msg);
39 void twister512_lastBlock(twister512_ctx_t *ctx, const void *msg, uint16_t length_b);
40 void twister512_ctx2hash(void *dest, twister512_ctx_t *ctx);
41 void twister512(void *dest, const void *msg, uint32_t msg_length_b);
42
43
44 #endif /* TWISTER_large_H_ */
45