mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibCrypto: Add LCM functionality to UnsignedBigInteger
This commit is contained in:
Notes:
github-actions[bot]
2025-06-25 00:23:14 +00:00
Author: https://github.com/devgianlu Commit: https://github.com/LadybirdBrowser/ladybird/commit/d55f759bbb9 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4950 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/alimpfard Reviewed-by: https://github.com/konradekk Reviewed-by: https://github.com/shannonbooth
@@ -323,6 +323,13 @@ FLATTEN UnsignedBigInteger UnsignedBigInteger::gcd(UnsignedBigInteger const& oth
|
||||
return result;
|
||||
}
|
||||
|
||||
FLATTEN UnsignedBigInteger UnsignedBigInteger::lcm(UnsignedBigInteger const& other) const
|
||||
{
|
||||
UnsignedBigInteger result;
|
||||
MP_MUST(mp_lcm(&m_mp, &other.m_mp, &result.m_mp));
|
||||
return result;
|
||||
}
|
||||
|
||||
u32 UnsignedBigInteger::hash() const
|
||||
{
|
||||
if (m_hash.has_value())
|
||||
|
||||
Reference in New Issue
Block a user