summaryrefslogtreecommitdiff
path: root/AK/Base64.h
AgeCommit message (Collapse)Author
2023-01-10AK+LibWeb: Move decode forgiving base64 under Web::Infra namespaceArda Cinar
Since the forgiving base64 is part of the web infra standard
2023-01-10AK: Expose Base64 tables from Base64.hArda Cinar
This change is necessary to move the forgiving base64 decoder to LibWeb
2022-12-28AK: Add a forgiving_base64_decode helperArda Cinar
According to the specification at https://infra.spec.whatwg.org/#forgiving-base64
2022-12-20AK: Stop using `DeprecatedString` in Base64 encodingJelle Raaijmakers
2022-12-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
2022-11-26AK: Make it possible to not `using` AK classes into the global namespaceAndreas Kling
This patch adds the `USING_AK_GLOBALLY` macro which is enabled by default, but can be overridden by build flags. This is a step towards integrating Jakt and AK types.
2022-07-04AK: Add `nodiscard` attribute to Base64 functionsLenny Maiorani
2022-01-24AK+Userland: Make AK::decode_base64 return ErrorOrSam Atkins
2022-01-24AK+Userland: Make AK::decode_hex() return ErrorOrSam Atkins
This lets us propagate the reason why it failed up to the caller. :^)
2021-11-11Everywhere: Pass AK::StringView by valueAndreas Kling
2021-10-23AK+Everywhere: Make Base64 decoding fallibleBen Wiederhake
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-02-08Everywhere: Remove unnecessary headers 3/4Ben Wiederhake
Arbitrarily split up to make git bisect easier. These unnecessary #include's were found by combining an automated tool (which determined likely candidates) and some brain power (which decided whether the #include is also semantically superfluous).
2020-10-13Base64: Pre-allocate size of input and outputLenny Maiorani
Problem: - Output of decode and encode grow as the decode and encode happen. This is inefficient because a large size will require many reallocations. - `const` qualifiers are missing on variables which are not intended to change. Solution: - Since the size of the decoded or encoded message is known prior to starting, calculate the size and set the output to that size immediately. All appends will not incur the reallocation overhead. - Add `const` qualifiers to show intent.
2020-07-27AK: Change the signature of AK::encode_base64() to use Span.asynts
2020-07-22AK: Make encode_base64 take a ByteBuffer and return a StringNico Weber
That makes the interface symmetric with decode_base64 and it's what all current callers want (except for one, which is buggy).
2020-06-18AK: Add a simple and inefficient Base64 encoderTom Lebreux
The test cases are taken from RFC 4648.
2020-05-29Meta: Add a script check the presence of "#pragma once" in header filesEmanuele Torre
.. and make travis run it. I renamed check-license-headers.sh to check-style.sh and expanded it so that it now also checks for the presence of "#pragma once" in .h files. It also checks the presence of a (single) blank line above and below the "#pragma once" line. I also added "#pragma once" to all the files that need it: even the ones we are not check. I also added/removed blank lines in order to make the script not fail. I also ran clang-format on the files I modified.
2020-04-26AK: Add a simple and inefficient Base64 decoderAndreas Kling