mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 02:27:19 +02:00
LibCrypto: Define *BigInteger::to_base to convert big integers to String
This commit is contained in:
committed by
Linus Groh
parent
0ddc2e1f50
commit
3ad1f250e7
Notes:
sideshowbarker
2024-07-17 01:41:35 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/3ad1f250e7 Pull-request: https://github.com/SerenityOS/serenity/pull/17014 Reviewed-by: https://github.com/linusg ✅
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <AK/Concepts.h>
|
||||
#include <AK/Span.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibCrypto/BigInt/UnsignedBigInteger.h>
|
||||
|
||||
namespace Crypto {
|
||||
@@ -63,6 +64,7 @@ public:
|
||||
size_t export_data(Bytes, bool remove_leading_zeros = false) const;
|
||||
|
||||
[[nodiscard]] static SignedBigInteger from_base(u16 N, StringView str);
|
||||
[[nodiscard]] ErrorOr<String> to_base(u16 N) const;
|
||||
[[nodiscard]] DeprecatedString to_base_deprecated(u16 N) const;
|
||||
|
||||
[[nodiscard]] u64 to_u64() const;
|
||||
|
||||
Reference in New Issue
Block a user