]> git.cryptolib.org Git - avr-crypto-lib.git/blob - twister-small.h
ca68e359be2fc475c57adf7dfa86e42d0d3b2221
[avr-crypto-lib.git] / twister-small.h
1 /* twister-small.h */
2
3 #ifndef TWISTER_SMALL_H_
4 #define TWISTER_SMALL_H_
5
6 #include "twister.h"
7
8 typedef uint8_t twister256_hash_t[256/8];
9 typedef uint8_t twister224_hash_t[224/8];
10
11 typedef twister_state_t twister256_ctx_t;
12 typedef twister_state_t twister224_ctx_t;
13
14 void twister_small_nextBlock(twister_state_t* ctx, void* msg);
15 void twister_small_init(twister_state_t* ctx, uint16_t hashsize_b);
16 void twister_small_lastBlock(twister_state_t* ctx, void* msg, uint16_t length_b);
17 void twister_small_ctx2hash(void* dest, twister256_ctx_t* ctx, uint16_t hashsize_b);
18
19
20 void twister256_init(twister256_ctx_t* ctx);
21 void twister256_nextBlock(twister256_ctx_t* ctx, void* msg);
22 void twister256_lastBlock(twister256_ctx_t* ctx, void* msg, uint16_t length_b);
23 void twister256_ctx2hash(void* dest, twister_state_t* ctx);
24 void twister256(void* dest, void* msg, uint32_t msg_length_b);
25
26 void twister224_init(twister224_ctx_t* ctx);
27 void twister224_nextBlock(twister224_ctx_t* ctx, void* msg);
28 void twister224_lastBlock(twister224_ctx_t* ctx, void* msg, uint16_t length_b);
29 void twister224_ctx2hash(void* dest, twister224_ctx_t* ctx);
30 void twister224(void* dest, void* msg, uint32_t msg_length_b);
31
32 #endif /* TWISTER_SMALL_H_ */