Embedded SDK
Embedded SDK
lcx_cmac.h
Go to the documentation of this file.
1 /* @BANNER@ */
2 
8 #ifdef HAVE_CMAC
9 
10 #ifndef LCX_CMAC_H
11 #define LCX_CMAC_H
12 
13 #include "lcx_cipher.h"
14 #include "cx_errors.h"
15 
16 WARN_UNUSED_RESULT cx_err_t cx_cmac_start(cx_cipher_context_t *ctx,
17  const uint8_t *key,
18  size_t key_bitlen);
19 
20 WARN_UNUSED_RESULT cx_err_t cx_cmac_update(cx_cipher_context_t *ctx,
21  const uint8_t *input,
22  size_t in_len);
23 
24 WARN_UNUSED_RESULT cx_err_t cx_cmac_finish(cx_cipher_context_t *ctx, uint8_t *output);
25 
26 WARN_UNUSED_RESULT cx_err_t cx_cmac(const cx_cipher_id_t type,
27  const uint8_t *key,
28  size_t key_bitlen,
29  const uint8_t *input,
30  size_t in_len,
31  uint8_t *output);
32 
33 #endif /* LCX_CMAC_H */
34 
35 #endif // HAVE_CMAC
API for block ciphers.
cx_cipher_id_t
Definition: lcx_cipher.h:36
unsigned char uint8_t
Definition: usbd_conf.h:53