summaryrefslogtreecommitdiff
path: root/AK/Base64.h
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2021-10-23 15:43:59 +0200
committerLinus Groh <mail@linusgroh.de>2021-10-23 19:16:40 +0100
commitcb868cfa41072e08987e1c32f117483445ba197d (patch)
tree89660af33860e44523b81ef66fbf375f6533eb57 /AK/Base64.h
parent3bf1f7ae874918365acedc3d511b60b066b9d4aa (diff)
downloadserenity-cb868cfa41072e08987e1c32f117483445ba197d.zip
AK+Everywhere: Make Base64 decoding fallible
Diffstat (limited to 'AK/Base64.h')
-rw-r--r--AK/Base64.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/AK/Base64.h b/AK/Base64.h
index 51ca2e6630..c1c5388629 100644
--- a/AK/Base64.h
+++ b/AK/Base64.h
@@ -7,6 +7,7 @@
#pragma once
#include <AK/ByteBuffer.h>
+#include <AK/Optional.h>
#include <AK/String.h>
#include <AK/StringView.h>
@@ -16,7 +17,7 @@ size_t calculate_base64_decoded_length(const StringView&);
size_t calculate_base64_encoded_length(ReadonlyBytes);
-ByteBuffer decode_base64(const StringView&);
+Optional<ByteBuffer> decode_base64(const StringView&);
String encode_base64(ReadonlyBytes);