mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 17:19:13 +00:00
LibCrypto: Introduce a falible API for SignedBigInteger::shift_left
This commit is contained in:
parent
c48641c13a
commit
8fda05d8b7
Notes:
github-actions[bot]
2025-02-19 14:02:02 +00:00
Author: https://github.com/ttrssreal
Commit: 8fda05d8b7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3615
6 changed files with 48 additions and 8 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue