mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-22 01:20:39 +00:00
The DynamoDB API uses base64 encoding to encode binary blobs as JSON strings. So we need functions to do these conversions. This code was "inspired" by https://github.com/ReneNyffenegger/cpp-base64 but doesn't actually copy code from it. I didn't write any specific unit tests for this code, but it will be exercised and tested in a following patch which tests Alternator's use of these functions. Signed-off-by: Nadav Har'El <nyh@scylladb.com>
18 lines
299 B
C++
18 lines
299 B
C++
/*
|
|
* Copyright 2019 ScyllaDB
|
|
*/
|
|
|
|
/*
|
|
* This file is part of Scylla.
|
|
*
|
|
* See the LICENSE.PROPRIETARY file in the top-level directory for licensing information.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
#include "bytes.hh"
|
|
|
|
std::string base64_encode(bytes_view);
|
|
bytes base64_decode(std::string_view);
|