mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 09:12:13 -05:00
LibCrypto: DER.cpp use uz literals
This commit is contained in:
parent
3e69794c7d
commit
e2b6ab4a69
Notes:
github-actions[bot]
2024-12-09 00:19:05 +00:00
Author: https://github.com/R-Goc Commit: https://github.com/LadybirdBrowser/ladybird/commit/e2b6ab4a699 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2487 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/LucasChollet Reviewed-by: https://github.com/alimpfard
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