1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:57:45 +00:00

AK: Ignore whitespace while decoding base64

This matches how other implementations behave.

1% progression on ACID3. :^)
This commit is contained in:
Andreas Kling 2022-02-25 19:35:51 +01:00
parent 17f34488f6
commit f2663f477f
3 changed files with 38 additions and 10 deletions

View file

@ -27,6 +27,8 @@ TEST_CASE(test_decode)
decode_equal("Zm9vYg==", "foob");
decode_equal("Zm9vYmE=", "fooba");
decode_equal("Zm9vYmFy", "foobar");
decode_equal("Z m\r9\n v\v Ym\tFy", "foobar");
EXPECT_EQ(decode_base64(" ZD Qg\r\nPS An Zm91cic\r\n 7"sv).value(), decode_base64("ZDQgPSAnZm91cic7"sv).value());
}
TEST_CASE(test_decode_invalid)