mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibCrypto: DER.cpp use uz literals
This commit is contained in:
parent
6b532ac833
commit
fbec694013
1 changed files with 2 additions and 2 deletions
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue