From 399dc211fa658b1137fc871f99542e6f5ea6f494 Mon Sep 17 00:00:00 2001 From: Michiel Visser Date: Thu, 9 Nov 2023 18:55:13 +0100 Subject: [PATCH] LibCrypto: Use simplified u256 constructor when reading big endian data --- Userland/Libraries/LibCrypto/Curves/SECP256r1.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibCrypto/Curves/SECP256r1.cpp b/Userland/Libraries/LibCrypto/Curves/SECP256r1.cpp index e9be6357f5..ab1a3157be 100644 --- a/Userland/Libraries/LibCrypto/Curves/SECP256r1.cpp +++ b/Userland/Libraries/LibCrypto/Curves/SECP256r1.cpp @@ -69,7 +69,7 @@ static u256 import_big_endian(ReadonlyBytes data) u64 b = AK::convert_between_host_and_big_endian(ByteReader::load64(data.offset_pointer(2 * sizeof(u64)))); u64 a = AK::convert_between_host_and_big_endian(ByteReader::load64(data.offset_pointer(3 * sizeof(u64)))); - return u256 { u128 { a, b }, u128 { c, d } }; + return u256 { { a, b, c, d } }; } static void export_big_endian(u256 const& value, Bytes data)