Closed
Conversation
Fixes #348 we only need to read the contents of the repo to run our tests, no other permissions are needed, as we currently do not publish via our CI jobs. Signed-off-by: Joe Richey <joerichey@google.com>
Signed-off-by: Joe Richey <joerichey@google.com>
Closed
Right now we only have a single option `Option::DEFAULT`. However, in the future, we could add options to: - guarantee the function doesn't block - use a insecure but quicker system source (for seeding hashmaps). - not use a fallback mechanism - never use the custom RNG source - always prefere the custom RNG source if it exists Not all of these are things we should _necessarily_ do, but this gives us the flexibility to add such options in the future. Signed-off-by: Joe Richey <joerichey@google.com>
Member
|
I understand rationale behind exposing less secure, but non-blocking I suggest we focus on the
|
Member
|
Closing it in favor of #365. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Looking through the wonderful review by @m-ou-se in m-ou-se#1, I realized that at some point we might need a separate API for generating hashmap seeds. This is because when generating a hashmap seed on Linux, we would not want to block waiting on the RNG to initialize.
However, if we decided to add a different source or configuration for the RNG one day, it wouldn't make sense to just have it be a free function in this crate. This is because with the addition of #291 (and potentially #293), we also use free functions to get the random bytes in different ways (fill a
&mut [u8], fill a&mut [MaybeUninit<u8>], return an array).This PR contains the proposed
OptionsAPI:Optionswould determine the RNG source/configuration.Optionswould be used to get random bytes in different ways:fillfill_uninitarray(not in this PR, see Add Options::array method for creating random arrays #352 for how we might add it)Right now we only have a single option:
Options::DEFAULT. However, in the future, we could addOptionsto:Not all of these are things we should necessarily do, but this gives
us the flexibility to add such options in the future.
Bikeshed: This enum could be called
Options/Source/Config, it could also be an opaque struct at this point rather than an enum (as we only have one variant).Signed-off-by: Joe Richey joerichey@google.com