mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
LibCrypto+LibJS: Add to_i64 method for SignedBigInteger and use it
This commit is contained in:
Notes:
github-actions[bot]
2026-01-16 12:01:41 +00:00
Author: https://github.com/Lubrsi Commit: https://github.com/LadybirdBrowser/ladybird/commit/8395db7e84f Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7466 Reviewed-by: https://github.com/trflynn89 ✅
@@ -144,6 +144,11 @@ ErrorOr<String> SignedBigInteger::to_base(u16 N) const
|
||||
return StringView(buffer.bytes().slice(0, written - 1)).to_ascii_lowercase_string();
|
||||
}
|
||||
|
||||
i64 SignedBigInteger::to_i64() const
|
||||
{
|
||||
return mp_get_i64(&m_mp);
|
||||
}
|
||||
|
||||
u64 SignedBigInteger::to_u64() const
|
||||
{
|
||||
return mp_get_u64(&m_mp);
|
||||
|
||||
Reference in New Issue
Block a user