This repository was archived by the owner on Nov 15, 2023. It is now read-only.
app_crypto_pair::from_seed(&Seed) should take ownership of seed#9683
Closed
gilescope wants to merge 4 commits intoparitytech:masterfrom
Closed
app_crypto_pair::from_seed(&Seed) should take ownership of seed#9683gilescope wants to merge 4 commits intoparitytech:masterfrom
gilescope wants to merge 4 commits intoparitytech:masterfrom
Conversation
Member
|
If |
Contributor
Author
|
Doesn't it feel more secure that it takes ownership of the seed rather than the seed continuing to float about memory until such time as it gets dropped? We could ensure at that point that the seed's memory was zeroed once we'd made use of it. (And if people did want to keep the seed we'd force them to clone it - this feels safer by design to me.) |
Member
Why does this feels safer that the user needs to clone it? In the current design the user could ensure that the type is wrapped in a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
to
from_seedshouldn't be used so this doesn't really matter, but I think it's nicer if the function takes ownership of the seed.(This PR looks even nicer once zebra lands as you can hand the ownership over to it)
(There's already a
from_seed_sliceif people really want to retain ownership)