forked from SzczepanLeon/wMbus-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
utils.hpp
22 lines (18 loc) · 927 Bytes
/
utils.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/***********************************************************************************
Filename: utils.hpp
***********************************************************************************/
#ifndef _UTILS_H
#define _UTILS_H
#include <Arduino.h>
#include <stdint.h>
#include <vector>
//----------------------------------------------------------------------------------
// Function Declareration
//----------------------------------------------------------------------------------
void dumpHex(uint8_t* data, uint8_t len, bool newLine = true);
unsigned char *safeButUnsafeVectorPtr(std::vector<unsigned char> &v);
bool decrypt_TPL_AES_CBC_IV(std::vector<unsigned char> &frame, std::vector<unsigned char>::iterator &pos,
std::vector<unsigned char> &key, unsigned char *iv,
int *num_encrypted_bytes,
int *num_not_encrypted_at_end);
#endif