Ordo  0.3.4
Symmetric Cryptography Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
ctr.h
Go to the documentation of this file.
1 /*===-- enc/block_modes/ctr.h --------------------------*- PUBLIC -*- H -*-===*/
21 /*===----------------------------------------------------------------------===*/
22 
23 #ifndef ORDO_CTR_MODE_H
24 #define ORDO_CTR_MODE_H
25 
27 #include "ordo/common/interface.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /*===----------------------------------------------------------------------===*/
37 
38 #define ctr_init ordo_ctr_init
39 #define ctr_update ordo_ctr_update
40 #define ctr_final ordo_ctr_final
41 #define ctr_query ordo_ctr_query
42 #define ctr_bsize ordo_ctr_bsize
43 
44 /*===----------------------------------------------------------------------===*/
45 
48 ORDO_PUBLIC
49 int ctr_init(struct CTR_STATE *state,
50  struct BLOCK_STATE *cipher_state,
51  const void *iv, size_t iv_len,
52  int dir,
53  const void *params);
54 
57 ORDO_PUBLIC
58 void ctr_update(struct CTR_STATE *state,
59  struct BLOCK_STATE *cipher_state,
60  const void *in, size_t in_len,
61  void *out, size_t *out_len);
62 
65 ORDO_PUBLIC
66 int ctr_final(struct CTR_STATE *state,
67  struct BLOCK_STATE *cipher_state,
68  void *out, size_t *out_len);
69 
72 ORDO_PUBLIC
73 size_t ctr_query(prim_t cipher,
74  int query, size_t value);
75 
82 ORDO_PUBLIC
83 size_t ctr_bsize(void);
84 
85 /*===----------------------------------------------------------------------===*/
86 
87 #ifdef __cplusplus
88 }
89 #endif
90 
91 #endif
int prim_t
Data type which holds a primitive identifier.
Definition: identification.h:58
ORDO_PUBLIC int ctr_init(struct CTR_STATE *state, struct BLOCK_STATE *cipher_state, const void *iv, size_t iv_len, int dir, const void *params)
Definition: ctr.c:42
ORDO_PUBLIC int ctr_final(struct CTR_STATE *state, struct BLOCK_STATE *cipher_state, void *out, size_t *out_len)
Definition: ctr.c:91
ORDO_PUBLIC size_t ctr_query(prim_t cipher, int query, size_t value)
ORDO_PUBLIC size_t ctr_bsize(void)
ORDO_PUBLIC void ctr_update(struct CTR_STATE *state, struct BLOCK_STATE *cipher_state, const void *in, size_t in_len, void *out, size_t *out_len)
Definition: ctr.c:63
Abstraction Layer.