Dibbler - a portable DHCPv6  1.0.2RC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cbc.h File Reference
#include "nettle-types.h"
+ Include dependency graph for cbc.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CBC_CTX(type, size)   { type ctx; uint8_t iv[size]; }
#define cbc_decrypt   nettle_cbc_decrypt
#define CBC_DECRYPT(self, f, length, dst, src)
#define cbc_encrypt   nettle_cbc_encrypt
#define CBC_ENCRYPT(self, f, length, dst, src)
#define CBC_SET_IV(ctx, data)   memcpy((ctx)->iv, (data), sizeof((ctx)->iv))

Typedefs

typedef void(* nettle_crypt_func )(void *ctx, unsigned length, uint8_t *dst, const uint8_t *src)

Functions

void nettle_cbc_decrypt (void *ctx, nettle_crypt_func f, unsigned block_size, uint8_t *iv, unsigned length, uint8_t *dst, const uint8_t *src)
void nettle_cbc_encrypt (void *ctx, nettle_crypt_func f, unsigned block_size, uint8_t *iv, unsigned length, uint8_t *dst, const uint8_t *src)

Macro Definition Documentation

#define CBC_CTX (   type,
  size 
)    { type ctx; uint8_t iv[size]; }
#define cbc_decrypt   nettle_cbc_decrypt
#define CBC_DECRYPT (   self,
  f,
  length,
  dst,
  src 
)
Value:
(0 ? ((f)(&(self)->ctx, 0, NULL, NULL)) \
: cbc_decrypt((void *) &(self)->ctx, \
(void (*)(void *, unsigned, uint8_t *, const uint8_t *)) (f), \
sizeof((self)->iv), (self)->iv, \
(length), (dst), (src)))
#define cbc_encrypt   nettle_cbc_encrypt
#define CBC_ENCRYPT (   self,
  f,
  length,
  dst,
  src 
)
Value:
(0 ? ((f)(&(self)->ctx, 0, NULL, NULL)) \
: cbc_encrypt((void *) &(self)->ctx, \
(void (*)(void *, unsigned, uint8_t *, const uint8_t *)) (f), \
sizeof((self)->iv), (self)->iv, \
(length), (dst), (src)))
#define CBC_SET_IV (   ctx,
  data 
)    memcpy((ctx)->iv, (data), sizeof((ctx)->iv))

Typedef Documentation

typedef void(* nettle_crypt_func)(void *ctx, unsigned length, uint8_t *dst, const uint8_t *src)

Function Documentation

void nettle_cbc_decrypt ( void *  ctx,
nettle_crypt_func  f,
unsigned  block_size,
uint8_t *  iv,
unsigned  length,
uint8_t *  dst,
const uint8_t *  src 
)
void nettle_cbc_encrypt ( void *  ctx,
nettle_crypt_func  f,
unsigned  block_size,
uint8_t *  iv,
unsigned  length,
uint8_t *  dst,
const uint8_t *  src 
)