Luna/libluna/include/luna/Base64.h

14 lines
389 B
C++

#pragma once
#include <luna/Buffer.h>
#include <luna/String.h>
namespace Base64
{
Result<String> encode(StringView data);
Result<String> encode(Slice<const u8> data);
Result<String> encode(const Buffer& data);
Result<Buffer> decode(StringView data, bool allow_garbage_chars = false);
Result<String> decode_string(StringView data, bool allow_garbage_chars = false);
}