LibCrypto: DER.cpp use uz literals

This commit is contained in:
R-Goc 2024-11-21 22:05:08 +01:00
parent 6b532ac833
commit fbec694013
No known key found for this signature in database

View file

@ -265,7 +265,7 @@ ErrorOr<void> Encoder::write_length(size_t value)
double minimum_bits = AK::log2(value);
size_t size_in_bits = AK::floor(minimum_bits) + 1;
size_t size = ceil_div(size_in_bits, 8z);
size_t size = ceil_div(size_in_bits, 8uz);
TRY(write_byte(0x80 | size));
for (size_t i = 0; i < size; i++) {
@ -433,7 +433,7 @@ ErrorOr<void> Encoder::write_bit_string(BitStringView view, Optional<Class> clas
auto total_size_in_bits = view.byte_length() * 8 - unused_bits;
TRY(write_tag(class_, type, kind));
TRY(write_length(ceil_div(total_size_in_bits, 8z) + 1));
TRY(write_length(ceil_div(total_size_in_bits, 8uz) + 1));
TRY(write_byte(unused_bits));
return write_bytes(view.underlying_bytes());
}