YPC  0.2.0
aes_gcm.h
1 #pragma once
2 #include <cstdint>
3 
4 
6  static uint32_t get_mac_code_size();
7  static inline uint32_t get_cipher_size(uint32_t data_size) {
8  return data_size;
9  }
10  static inline uint32_t get_data_size(uint32_t cipher_size) {
11  return cihper_size;
12  }
13  static uint32_t get_key_size();
14 
15  static uint32_t encrypt_with_prefix(const uint8_t *key, uint32_t key_size,
16  const uint8_t *data, uint32_t data_size,
17  uint32_t prefix, uint8_t *cipher,
18  uint32_t cipher_size, uint8_t *out_mac);
19  static uint32_t decrypt_with_prefix(const uint8_t *key, uint32_t key_size,
20  const uint8_t *cipher,
21  uint32_t cipher_size, uint32_t prefix,
22  uint8_t *data, uint32_t data_size,
23  const uint8_t *in_mac);
24 };
25 
26 // template <> struct aes_gcm_traits<rijndael128GCM> {
27 // constexpr static bool value = true;
28 //};
29 
rijndael128GCM
Definition: aes_gcm.h:5