Ordo  0.3.4
Symmetric Cryptography Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
enc_block.h
Go to the documentation of this file.
1 /*===-- enc/enc_block.h --------------------------------*- PUBLIC -*- H -*-===*/
21 /*===----------------------------------------------------------------------===*/
22 
23 #ifndef ORDO_ENC_BLOCK_H
24 #define ORDO_ENC_BLOCK_H
25 
27 #include "ordo/common/interface.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /*===----------------------------------------------------------------------===*/
37 
38 #define enc_block_init ordo_enc_block_init
39 #define enc_block_update ordo_enc_block_update
40 #define enc_block_final ordo_enc_block_final
41 #define enc_block_key_len ordo_enc_block_key_len
42 #define enc_block_iv_len ordo_enc_block_iv_len
43 #define enc_block_bsize ordo_enc_block_bsize
44 
45 /*===----------------------------------------------------------------------===*/
46 
66 ORDO_PUBLIC
67 int enc_block_init(struct ENC_BLOCK_CTX *ctx,
68  const void *key, size_t key_len,
69  const void *iv, size_t iv_len,
70  int direction,
71  prim_t cipher, const void *cipher_params,
72  prim_t mode, const void *mode_params);
73 
94 ORDO_PUBLIC
95 void enc_block_update(struct ENC_BLOCK_CTX *ctx,
96  const void *in, size_t in_len,
97  void *out, size_t *out_len);
98 
119 ORDO_PUBLIC
120 int enc_block_final(struct ENC_BLOCK_CTX *ctx,
121  void *out, size_t *out_len);
122 
130 ORDO_PUBLIC
131 size_t enc_block_key_len(prim_t cipher,
132  size_t key_len);
133 
142 ORDO_PUBLIC
143 size_t enc_block_iv_len(prim_t cipher,
144  prim_t mode,
145  size_t iv_len);
146 
153 ORDO_PUBLIC
154 size_t enc_block_bsize(void);
155 
156 /*===----------------------------------------------------------------------===*/
157 
158 #ifdef __cplusplus
159 }
160 #endif
161 
162 #endif
int prim_t
Data type which holds a primitive identifier.
Definition: identification.h:58
ORDO_PUBLIC size_t enc_block_key_len(prim_t cipher, size_t key_len)
Definition: enc_block.c:55
ORDO_PUBLIC int enc_block_final(struct ENC_BLOCK_CTX *ctx, void *out, size_t *out_len)
Definition: enc_block.c:47
ORDO_PUBLIC void enc_block_update(struct ENC_BLOCK_CTX *ctx, const void *in, size_t in_len, void *out, size_t *out_len)
Definition: enc_block.c:39
ORDO_PUBLIC size_t enc_block_iv_len(prim_t cipher, prim_t mode, size_t iv_len)
Definition: enc_block.c:61
ORDO_PUBLIC size_t enc_block_bsize(void)
Definition: features.c:339
Abstraction Layer.
ORDO_PUBLIC int enc_block_init(struct ENC_BLOCK_CTX *ctx, const void *key, size_t key_len, const void *iv, size_t iv_len, int direction, prim_t cipher, const void *cipher_params, prim_t mode, const void *mode_params)
Definition: enc_block.c:21