mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
LibCrypto: Change [XXX]BigInteger::export_data() to use Span.
This commit is contained in:
Notes:
sideshowbarker
2024-07-19 04:32:35 +09:00
Author: https://github.com/asynts Commit: https://github.com/SerenityOS/serenity/commit/4709b700bd9 Pull-request: https://github.com/SerenityOS/serenity/pull/2903
@@ -36,10 +36,10 @@ SignedBigInteger SignedBigInteger::import_data(const u8* ptr, size_t length)
|
||||
return { move(unsigned_data), sign };
|
||||
}
|
||||
|
||||
size_t SignedBigInteger::export_data(AK::ByteBuffer& data) const
|
||||
size_t SignedBigInteger::export_data(Bytes data) const
|
||||
{
|
||||
data[0] = m_sign;
|
||||
auto bytes_view = data.slice_view(1, data.size() - 1);
|
||||
auto bytes_view = data.slice(1, data.size() - 1);
|
||||
return m_unsigned_data.export_data(bytes_view) + 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user