summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCore/Account.cpp
diff options
context:
space:
mode:
authorJelle Raaijmakers <jelle@gmta.nl>2022-12-19 00:23:47 +0100
committerAndreas Kling <kling@serenityos.org>2022-12-20 10:34:19 +0100
commit25f2e4981c1236f69776c290fba7472ec7714869 (patch)
treebf46d80f5e93fe9590dc990082751c7b320fc9dd /Userland/Libraries/LibCore/Account.cpp
parent99c1b634fc80c922ca4867e4eac83b73e4c28304 (diff)
downloadserenity-25f2e4981c1236f69776c290fba7472ec7714869.zip
AK: Stop using `DeprecatedString` in Base64 encoding
Diffstat (limited to 'Userland/Libraries/LibCore/Account.cpp')
-rw-r--r--Userland/Libraries/LibCore/Account.cpp5
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();
}