Ordo  0.3.4
Symmetric Cryptography Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
cbc.h
Go to the documentation of this file.
1 /*===-- enc/block_modes/cbc.h --------------------------*- PUBLIC -*- H -*-===*/
25 /*===----------------------------------------------------------------------===*/
26 
27 #ifndef ORDO_CBC_MODE_H
28 #define ORDO_CBC_MODE_H
29 
31 #include "ordo/common/interface.h"
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 /*===----------------------------------------------------------------------===*/
41 
42 #define cbc_init ordo_cbc_init
43 #define cbc_update ordo_cbc_update
44 #define cbc_final ordo_cbc_final
45 #define cbc_query ordo_cbc_query
46 #define cbc_bsize ordo_cbc_bsize
47 
48 /*===----------------------------------------------------------------------===*/
49 
52 ORDO_PUBLIC
53 int cbc_init(struct CBC_STATE *state,
54  struct BLOCK_STATE *cipher_state,
55  const void *iv, size_t iv_len,
56  int dir,
57  const struct CBC_PARAMS *params);
58 
61 ORDO_PUBLIC
62 void cbc_update(struct CBC_STATE *state,
63  struct BLOCK_STATE *cipher_state,
64  const void *in, size_t in_len,
65  void *out, size_t *out_len);
66 
69 ORDO_PUBLIC
70 int cbc_final(struct CBC_STATE *state,
71  struct BLOCK_STATE *cipher_state,
72  void *out, size_t *out_len);
73 
76 ORDO_PUBLIC
77 size_t cbc_query(prim_t cipher,
78  int query, size_t value);
79 
86 ORDO_PUBLIC
87 size_t cbc_bsize(void);
88 
89 /*===----------------------------------------------------------------------===*/
90 
91 #ifdef __cplusplus
92 }
93 #endif
94 
95 #endif
int prim_t
Data type which holds a primitive identifier.
Definition: identification.h:58
ORDO_PUBLIC size_t cbc_query(prim_t cipher, int query, size_t value)
ORDO_PUBLIC int cbc_init(struct CBC_STATE *state, struct BLOCK_STATE *cipher_state, const void *iv, size_t iv_len, int dir, const struct CBC_PARAMS *params)
Definition: cbc.c:27
CBC parameters.
Definition: mode_params.h:38
ORDO_PUBLIC size_t cbc_bsize(void)
ORDO_PUBLIC void cbc_update(struct CBC_STATE *state, struct BLOCK_STATE *cipher_state, const void *in, size_t in_len, void *out, size_t *out_len)
Definition: cbc.c:174
Abstraction Layer.
ORDO_PUBLIC int cbc_final(struct CBC_STATE *state, struct BLOCK_STATE *cipher_state, void *out, size_t *out_len)
Definition: cbc.c:186