Ordo  0.3.4
Symmetric Cryptography Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
block_modes.h
Go to the documentation of this file.
1 /*===-- enc/block_modes.h ------------------------------*- PUBLIC -*- H -*-===*/
12 /*===----------------------------------------------------------------------===*/
13 
14 #ifndef ORDO_BLOCK_MODES_H
15 #define ORDO_BLOCK_MODES_H
16 
18 #include "ordo/common/interface.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /*===----------------------------------------------------------------------===*/
29 
30 #define block_mode_init ordo_block_mode_init
31 #define block_mode_update ordo_block_mode_update
32 #define block_mode_final ordo_block_mode_final
33 #define block_mode_query ordo_block_mode_query
34 #define block_mode_bsize ordo_block_mode_bsize
35 
36 /*===----------------------------------------------------------------------===*/
37 
50 ORDO_PUBLIC
51 int block_mode_init(struct BLOCK_MODE_STATE *state,
52  struct BLOCK_STATE *cipher_state,
53  const void *iv, size_t iv_len,
54  int direction,
55  prim_t primitive, const void *params);
56 
73 ORDO_PUBLIC
74 void block_mode_update(struct BLOCK_MODE_STATE *state,
75  struct BLOCK_STATE *cipher_state,
76  const void *in, size_t in_len,
77  void *out, size_t *out_len);
78 
92 ORDO_PUBLIC
93 int block_mode_final(struct BLOCK_MODE_STATE *state,
94  struct BLOCK_STATE *cipher_state,
95  void *out, size_t *out_len);
96 
108 ORDO_PUBLIC
109 size_t block_mode_query(prim_t mode, prim_t cipher,
110  int query, size_t value);
111 
118 ORDO_PUBLIC
119 size_t block_mode_bsize(void);
120 
121 /*===----------------------------------------------------------------------===*/
122 
123 #ifdef __cplusplus
124 }
125 #endif
126 
127 #endif
int prim_t
Data type which holds a primitive identifier.
Definition: identification.h:58
ORDO_PUBLIC int block_mode_init(struct BLOCK_MODE_STATE *state, struct BLOCK_STATE *cipher_state, const void *iv, size_t iv_len, int direction, prim_t primitive, const void *params)
Definition: block_modes.c:27
ORDO_PUBLIC size_t block_mode_query(prim_t mode, prim_t cipher, int query, size_t value)
Definition: block_modes.c:126
Primitive Parameters.
Abstraction Layer.
ORDO_PUBLIC size_t block_mode_bsize(void)
Definition: features.c:321
ORDO_PUBLIC int block_mode_final(struct BLOCK_MODE_STATE *state, struct BLOCK_STATE *cipher_state, void *out, size_t *out_len)
Definition: block_modes.c:95
ORDO_PUBLIC void block_mode_update(struct BLOCK_MODE_STATE *state, struct BLOCK_STATE *cipher_state, const void *in, size_t in_len, void *out, size_t *out_len)
Definition: block_modes.c:60