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>
|
2021-10-23 13:43:59 +00:00
|
|
|
#include <AK/Optional.h>
|
2020-10-13 14:48:48 +00:00
|
|
|
#include <AK/String.h>
|
|
|
|
#include <AK/StringView.h>
|
2020-04-26 20:49:19 +00:00
|
|
|
|
|
|
|
namespace AK {
|
|
|
|
|
2021-11-10 23:55:02 +00:00
|
|
|
size_t calculate_base64_decoded_length(StringView);
|
2020-10-13 14:48:48 +00:00
|
|
|
|
|
|
|
size_t calculate_base64_encoded_length(ReadonlyBytes);
|
|
|
|
|
2021-11-10 23:55:02 +00:00
|
|
|
Optional<ByteBuffer> decode_base64(StringView);
|
2020-04-26 20:49:19 +00:00
|
|
|
|
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;
|