Ordo  0.3.4
Symmetric Cryptography Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
ecb.h
Go to the documentation of this file.
1 /*===-- enc/block_modes/ecb.h --------------------------*- PUBLIC -*- H -*-===*/
18 /*===----------------------------------------------------------------------===*/
19 
20 #ifndef ORDO_ECB_MODE_H
21 #define ORDO_ECB_MODE_H
22 
24 #include "ordo/common/interface.h"
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 /*===----------------------------------------------------------------------===*/
34 
35 #define ecb_init ordo_ecb_init
36 #define ecb_update ordo_ecb_update
37 #define ecb_final ordo_ecb_final
38 #define ecb_query ordo_ecb_query
39 #define ecb_bsize ordo_ecb_bsize
40 
41 /*===----------------------------------------------------------------------===*/
42 
45 ORDO_PUBLIC
46 int ecb_init(struct ECB_STATE *state,
47  struct BLOCK_STATE *cipher_state,
48  const void *iv, size_t iv_len,
49  int dir,
50  const struct ECB_PARAMS *params);
51 
54 ORDO_PUBLIC
55 void ecb_update(struct ECB_STATE *state,
56  struct BLOCK_STATE *cipher_state,
57  const void *in, size_t in_len,
58  void *out, size_t *out_len);
59 
62 ORDO_PUBLIC
63 int ecb_final(struct ECB_STATE *state,
64  struct BLOCK_STATE *cipher_state,
65  void *out, size_t *out_len);
66 
69 ORDO_PUBLIC
70 size_t ecb_query(prim_t cipher,
71  int query, size_t value);
72 
79 ORDO_PUBLIC
80 size_t ecb_bsize(void);
81 
82 /*===----------------------------------------------------------------------===*/
83 
84 #ifdef __cplusplus
85 }
86 #endif
87 
88 #endif
int prim_t
Data type which holds a primitive identifier.
Definition: identification.h:58
ORDO_PUBLIC int ecb_init(struct ECB_STATE *state, struct BLOCK_STATE *cipher_state, const void *iv, size_t iv_len, int dir, const struct ECB_PARAMS *params)
Definition: ecb.c:26
ECB parameters.
Definition: mode_params.h:25
ORDO_PUBLIC void ecb_update(struct ECB_STATE *state, struct BLOCK_STATE *cipher_state, const void *in, size_t in_len, void *out, size_t *out_len)
Definition: ecb.c:46
ORDO_PUBLIC int ecb_final(struct ECB_STATE *state, struct BLOCK_STATE *cipher_state, void *out, size_t *out_len)
Definition: ecb.c:162
ORDO_PUBLIC size_t ecb_bsize(void)
Abstraction Layer.
ORDO_PUBLIC size_t ecb_query(prim_t cipher, int query, size_t value)