2021-06-27 21:25:29 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
|
|
|
File: Base64.hpp
|
|
|
|
Date: 2021-6-10
|
|
|
|
Author: Reece
|
|
|
|
***/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Aurora::Parse
|
|
|
|
{
|
2022-01-20 16:04:53 +00:00
|
|
|
AUKN_SYM bool Base64Decode(const AuString &in, Memory::ByteBuffer &decoded, bool url = false);
|
2021-06-27 21:25:29 +00:00
|
|
|
|
|
|
|
AUKN_SYM bool Base64Encode(const void *buffer, AuMach length, AuString &encoded, bool url = false);
|
|
|
|
static bool Base64Encode(const AuString &in, AuString &encoded, bool url = false)
|
|
|
|
{
|
|
|
|
return Base64Encode(in.data(), in.size(), encoded, url);
|
|
|
|
}
|
2022-01-20 16:04:53 +00:00
|
|
|
static bool Base64Encode(const Memory::ByteBuffer &in, AuString &encoded, bool url = false)
|
2021-06-27 21:25:29 +00:00
|
|
|
{
|
|
|
|
return Base64Encode(in.data(), in.size(), encoded, url);
|
|
|
|
}
|
|
|
|
}
|