summaryrefslogtreecommitdiff
path: root/src/GeneralUtils.h
blob: 152abca723978f7c3983e5df7698f448f06073ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 * GeneralUtils.h
 *
 *  Created on: May 20, 2017
 *      Author: kolban
 */
 
#ifndef COMPONENTS_CPP_UTILS_GENERALUTILS_H_
#define COMPONENTS_CPP_UTILS_GENERALUTILS_H_
#include <stdint.h>
#include <string>
#include <esp_err.h>
 
/**
 * @brief General utilities.
 */
class GeneralUtils {
public:
GeneralUtils();
virtual ~GeneralUtils();
static void hexDump(uint8_t *pData, uint32_t length);
static std::string ipToString(uint8_t *ip);
static bool base64Encode(const std::string &in, std::string *out);
static bool base64Decode(const std::string &in, std::string *out);
static const char *errorToString(esp_err_t errCode);
};
 
#endif /* COMPONENTS_CPP_UTILS_GENERALUTILS_H_ */