diff options
author | Jelle Raaijmakers <jelle@gmta.nl> | 2022-12-19 00:23:47 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-12-20 10:34:19 +0100 |
commit | 25f2e4981c1236f69776c290fba7472ec7714869 (patch) | |
tree | bf46d80f5e93fe9590dc990082751c7b320fc9dd /Userland/Libraries/LibCore/Account.cpp | |
parent | 99c1b634fc80c922ca4867e4eac83b73e4c28304 (diff) | |
download | serenity-25f2e4981c1236f69776c290fba7472ec7714869.zip |
AK: Stop using `DeprecatedString` in Base64 encoding
Diffstat (limited to 'Userland/Libraries/LibCore/Account.cpp')
-rw-r--r-- | Userland/Libraries/LibCore/Account.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Userland/Libraries/LibCore/Account.cpp b/Userland/Libraries/LibCore/Account.cpp index 03808e089c..17746d2cac 100644 --- a/Userland/Libraries/LibCore/Account.cpp +++ b/Userland/Libraries/LibCore/Account.cpp @@ -34,7 +34,10 @@ static DeprecatedString get_salt() StringBuilder builder; builder.append("$5$"sv); - builder.append(encode_base64(ReadonlyBytes(random_data, sizeof(random_data)))); + + // FIXME: change to TRY() and make method fallible + auto salt_string = MUST(encode_base64({ random_data, sizeof(random_data) })); + builder.append(salt_string); return builder.build(); } |