Allow specifying key length in add_by_key #376
Merged
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.
Related to stratis-storage/stratisd#3651
There is another set of values that can be passed in that is not currently exposed.
None
currently uses the key length specified by the format callSome
allows you to specify a keyHowever, in the case of of a
NO_SEGMENT
key, you need to be able to specify no key but provide a key length as it cannot inherit this from the format call on an existing crypt device.This PR exposes the API as follows:
None
uses the key length specified by the format callSome(Either::Left(_))
allows you to specify a keySome(Either::Right(_))
allows you to specify a key lengthThis will be a breaking change and will require a minor version bump.