mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
LibCrypto: Introduce a falible API for SignedBigInteger::shift_left
This commit is contained in:
Notes:
github-actions[bot]
2025-02-19 14:02:02 +00:00
Author: https://github.com/ttrssreal Commit: https://github.com/LadybirdBrowser/ladybird/commit/8fda05d8b79 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3615
@@ -481,17 +481,22 @@ FLATTEN UnsignedBigInteger UnsignedBigInteger::bitwise_not_fill_to_one_based_ind
|
||||
return result;
|
||||
}
|
||||
|
||||
FLATTEN UnsignedBigInteger UnsignedBigInteger::shift_left(size_t num_bits) const
|
||||
FLATTEN ErrorOr<UnsignedBigInteger> UnsignedBigInteger::try_shift_left(size_t num_bits) const
|
||||
{
|
||||
UnsignedBigInteger output;
|
||||
UnsignedBigInteger temp_result;
|
||||
UnsignedBigInteger temp_plus;
|
||||
|
||||
UnsignedBigIntegerAlgorithms::shift_left_without_allocation(*this, num_bits, temp_result, temp_plus, output);
|
||||
TRY(UnsignedBigIntegerAlgorithms::try_shift_left_without_allocation(*this, num_bits, temp_result, temp_plus, output));
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
FLATTEN UnsignedBigInteger UnsignedBigInteger::shift_left(size_t num_bits) const
|
||||
{
|
||||
return MUST(try_shift_left(num_bits));
|
||||
}
|
||||
|
||||
FLATTEN UnsignedBigInteger UnsignedBigInteger::shift_right(size_t num_bits) const
|
||||
{
|
||||
UnsignedBigInteger output;
|
||||
|
||||
Reference in New Issue
Block a user