summaryrefslogtreecommitdiff
path: root/AK/Hex.cpp
AgeCommit message (Collapse)Author
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-02-16AK: Return KString instead of String from encode_hex in the KernelIdan Horowitz
This let's us propagate allocation errors from this API.
2022-01-24AK+Userland: Make AK::decode_hex() return ErrorOrSam Atkins
This lets us propagate the reason why it failed up to the caller. :^)
2022-01-24Everywhere: Convert ByteBuffer factory methods from Optional -> ErrorOrSam Atkins
Apologies for the enormous commit, but I don't see a way to split this up nicely. In the vast majority of cases it's a simple change. A few extra places can use TRY instead of manual error checking though. :^)
2021-11-11Everywhere: Pass AK::StringView by valueAndreas Kling
2021-09-06Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safeAli Mohammad Pur
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-04-18AK/Hex: Cleanup implementationLenny Maiorani
Problem: - Post-increment of loop index. - `const` variables are not marked `const`. - Incorrect type for loop index. Solution: - Pre-increment loop index. - Mark all possible variables `const`. - Corret type for loop index.
2021-04-18AK/Hex: Decode hex digit in constexpr contextLenny Maiorani
Problem: - Hex digit decoding is not `constexpr`, but can be. Solution: - Move the body of the function to the header and decorate with `constexpr`. - Provide tests for run-time and compile-time evaluation.
2021-04-14AK: Expose the decode_hex_digit helperIdan Horowitz
This helper is useful on its own for things like uri encoding/decoding, so this commit exposes it via the AK/Hex header
2021-02-09AK: Use StringBuilder::appendff() instead of appendf()Andreas Kling
2020-12-13AK: Add {encode,decode}_hex similar to {encode,decode}_base64Conrad Pankoff