osquery-1/osquery/utils/base64.h
George Guliashvili 971bee4441 Move build system to BUCK
fbshipit-source-id: 8ffef5e6a393ac67ce56dcb74845402e43d964a0
2018-12-07 16:12:35 +00:00

38 lines
817 B
C++

/**
* Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under both the Apache 2.0 license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
* You may select, at your option, one of the above-listed licenses.
*/
#pragma once
#include <string>
namespace osquery {
namespace base64 {
/**
* @brief Decode a base64 encoded string.
*
* @param encoded The encode base64 string.
* @return Decoded string.
*/
std::string decode(std::string encoded);
/**
* @brief Encode a string.
*
* @param A string to encode.
* @return Encoded string.
*/
std::string encode(const std::string& unencoded);
} // namespace base64
} // namespace osquery