-
Notifications
You must be signed in to change notification settings - Fork 33
feat: serialize on the stack #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
09ac2e9
d1b3d24
677db58
0f3705b
a3afed8
30aa085
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -284,6 +284,13 @@ std::vector<uint8_t> PrivateKey::Serialize(const bool fLegacy) const | |
| return data; | ||
| } | ||
|
|
||
| std::array<uint8_t, PrivateKey::PRIVATE_KEY_SIZE> PrivateKey::SerializeToArray(bool fLegacy) const | ||
| { | ||
| std::array<uint8_t, PRIVATE_KEY_SIZE> data{}; | ||
| Serialize(data.data()); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is it forgotten to use
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure, but I'm guessing no? both PrivateKey::Serialize(uint8_t *buffer) and PrivateKey::Serialize(const bool fLegacy) don't use it. Maybe. private keys are not affected by legacy / non legacy There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it's a dummy one here which is needed because our |
||
| return data; | ||
| } | ||
|
|
||
| G2Element PrivateKey::SignG2( | ||
| const uint8_t *msg, | ||
| size_t len, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.