mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:07:45 +00:00
LibCrypto: Use simplified u256 constructor when reading big endian data
This commit is contained in:
parent
153cd3ecf0
commit
399dc211fa
1 changed files with 1 additions and 1 deletions
|
@ -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 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))));
|
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)
|
static void export_big_endian(u256 const& value, Bytes data)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue