NVIDIA DeepStream SDK API Reference

9.2 Release
9.2/includes/opentelemetry/sdk/common/base64.h
Go to the documentation of this file.
1 // Copyright The OpenTelemetry Authors
2 // SPDX-License-Identifier: Apache-2.0
3 
4 #pragma once
5 
6 #include <string>
7 
8 #include "opentelemetry/nostd/string_view.h"
9 #include "opentelemetry/version.h"
10 
12 namespace sdk
13 {
14 namespace common
15 {
16 // Base64Escape()
17 //
18 // Encodes a `src` string into a base64-encoded 'dest' string with padding
19 // characters. This function conforms with RFC 4648 section 4 (base64) and RFC
20 // 2045.
23 
24 // Base64Unescape()
25 //
26 // Converts a `src` string encoded in Base64 (RFC 4648 section 4) to its binary
27 // equivalent, writing it to a `dest` buffer, returning `true` on success. If
28 // `src` contains invalid characters, `dest` is cleared and returns `false`.
29 // If padding is included (note that `Base64Escape()` does produce it), it must
30 // be correct. In the padding, '=' are treated identically.
32 
33 } // namespace common
34 } // namespace sdk
OPENTELEMETRY_EXPORT
#define OPENTELEMETRY_EXPORT
Definition: includes/opentelemetry/common/macros.h:386
OPENTELEMETRY_BEGIN_NAMESPACE
#define OPENTELEMETRY_BEGIN_NAMESPACE
Definition: includes/opentelemetry/version.h:21
OPENTELEMETRY_END_NAMESPACE
#define OPENTELEMETRY_END_NAMESPACE
Definition: includes/opentelemetry/version.h:24
sdk::common::Base64Unescape
OPENTELEMETRY_EXPORT bool Base64Unescape(opentelemetry::nostd::string_view src, std::string *dest)
sdk
Definition: includes/opentelemetry/sdk/common/atomic_shared_ptr.h:13
nostd::string_view
std::string_view string_view
Definition: includes/opentelemetry/std/string_view.h:18
sdk::common::Base64Escape
OPENTELEMETRY_EXPORT void Base64Escape(opentelemetry::nostd::string_view src, std::string *dest)
common
Definition: includes/opentelemetry/common/attribute_value.h:14