multof moved from descriptor to object
[rofl0r-kripto.git] / include / kripto / authstream.h
blobb8fe23d092a33e4cdcadc7ce13647a6f8b179878
1 #ifndef KRIPTO_AUTHSTREAM_H
2 #define KRIPTO_AUTHSTREAM_H
4 #include <stddef.h>
6 typedef struct kripto_authstream_desc kripto_authstream_desc;
7 typedef struct kripto_authstream kripto_authstream;
9 extern kripto_authstream *kripto_authstream_create
11 const kripto_authstream_desc *desc,
12 unsigned int rounds,
13 const void *key,
14 unsigned int key_len,
15 const void *iv,
16 unsigned int iv_len,
17 unsigned int tag_len
20 extern kripto_authstream *kripto_authstream_recreate
22 kripto_authstream *s,
23 unsigned int rounds,
24 const void *key,
25 unsigned int key_len,
26 const void *iv,
27 unsigned int iv_len,
28 unsigned int tag_len
31 extern void kripto_authstream_encrypt
33 kripto_authstream *s,
34 const void *pt,
35 void *ct,
36 size_t len
39 extern void kripto_authstream_decrypt
41 kripto_authstream *s,
42 const void *ct,
43 void *pt,
44 size_t len
47 extern void kripto_authstream_header
49 kripto_authstream *s,
50 const void *header,
51 size_t len
54 extern void kripto_authstream_tag
56 kripto_authstream *s,
57 void *tag,
58 unsigned int len
61 extern void kripto_authstream_destroy(kripto_authstream *s);
63 extern unsigned int kripto_authstream_multof(const kripto_authstream *s);
65 extern const kripto_authstream_desc *kripto_authstream_getdesc(const kripto_authstream *s);
67 extern unsigned int kripto_authstream_maxkey(const kripto_authstream_desc *desc);
69 extern unsigned int kripto_authstream_maxiv(const kripto_authstream_desc *desc);
71 extern unsigned int kripto_authstream_maxtag(const kripto_authstream_desc *desc);
73 #endif