Files
rpc/utils.h
2021-08-16 17:43:07 -07:00

19 lines
758 B
C++

/*********************************************************************
* Copyright (c) Intel Corporation 2019 - 2020
* SPDX-License-Identifier: Apache-2.0
**********************************************************************/
#ifndef __UTILS_H__
#define __UTILS_H__
#include <string>
#include <vector>
std::string util_encode_base64(std::vector<unsigned char> str);
std::vector<unsigned char> util_decode_base64(std::string str);
bool util_is_printable(std::string str);
bool util_format_uuid(std::vector<unsigned char> uuid_bytes, std::string& uuid_string);
bool util_hex_string_to_bytes(std::string hex_string, std::vector<unsigned char>& hex_bytes);
bool util_bytes_to_hex_string(std::vector<unsigned char> hex_bytes, std::string& hex_string);
#endif