AK+Everywhere: Change AK::fill_with_random to accept a Bytes object

Rather than the very C-like API we currently have, accepting a void* and
a length, let's take a Bytes object instead. In almost all existing
cases, the compiler figures out the length.
This commit is contained in:
Timothy Flynn 2023-04-02 13:08:43 -04:00 committed by Andreas Kling
commit 15532df83d
Notes: sideshowbarker 2024-07-17 10:16:43 +09:00
20 changed files with 37 additions and 39 deletions

View file

@ -136,7 +136,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto get_salt = []() -> ErrorOr<DeprecatedString> {
char random_data[12];
fill_with_random(random_data, sizeof(random_data));
fill_with_random({ random_data, sizeof(random_data) });
StringBuilder builder;
builder.append("$5$"sv);