lgraph_utils
Typedefs
-
using json = nlohmann::json
-
namespace lgraph_api
Functions
-
double get_time()
Get current time.
- 返回
Digit value of current time.
-
void split_string(std::string origin_string, std::vector<std::string> &sub_strings, std::string string_delimiter)
Split the original string by format.
- 参数
origin_string – original string to be split.
sub_strings – split substring.
string_delimiter – Split format.
-
std::string rc4(std::string &input, std::string key, std::string mode)
Encrypt the input string in ac4 format.
- 参数
input – input string.
key – encryption key.
mode – encryption mode
- 返回
Encrypted string
-
std::string encode_base64(const std::string input)
Encode the input string in encode_base64 format.
- 参数
input – input string.
- 返回
Encrypted string
-
std::string decode_base64(const std::string input)
Decode the input string in decode_base64 format.
- 参数
input – input string.
- 返回
Decrypted string.
-
void *alloc_buffer(size_t bytes)
Allocate memory with size in byte.
- 参数
bytes – Size in byte of request memory.
- 返回
Pointer of allocated memory.
-
void dealloc_buffer(void *buffer, size_t bytes)
Free memory with size in byte.
- 参数
buffer – Size in bytes of request memory
bytes – Pointer of memory to free.
-
double get_time()