LibCrypto: DER.cpp use uz literals

This commit is contained in:
R-Goc 2024-11-21 22:05:08 +01:00 committed by Andrew Kaster
parent 3e69794c7d
commit e2b6ab4a69
Notes: github-actions[bot] 2024-12-09 00:19:05 +00:00

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());
}