2020-04-26 20:49:19 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
2021-04-22 08:24:48 +00:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-04-26 20:49:19 +00:00
|
|
|
*/
|
|
|
|
|
2020-05-28 18:40:53 +00:00
|
|
|
#pragma once
|
|
|
|
|
2020-10-13 14:48:48 +00:00
|
|
|
#include <AK/ByteBuffer.h>
|
|
|
|
#include <AK/String.h>
|
|
|
|
#include <AK/StringView.h>
|
2020-04-26 20:49:19 +00:00
|
|
|
|
|
|
|
namespace AK {
|
|
|
|
|
2020-10-13 14:48:48 +00:00
|
|
|
size_t calculate_base64_decoded_length(const StringView&);
|
|
|
|
|
|
|
|
size_t calculate_base64_encoded_length(ReadonlyBytes);
|
|
|
|
|
2020-04-26 20:49:19 +00:00
|
|
|
ByteBuffer decode_base64(const StringView&);
|
|
|
|
|
2020-07-27 12:16:33 +00:00
|
|
|
String encode_base64(ReadonlyBytes);
|
2020-06-13 02:09:31 +00:00
|
|
|
|
2020-04-26 20:49:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
using AK::decode_base64;
|
2020-06-13 02:09:31 +00:00
|
|
|
using AK::encode_base64;
|