You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We certainly do not want to depend on getrandom/rand_core by default. At the very least it should be behind a disabled-by-default feature.
Have you encountered the need for it in practice or is it done simply for completeness sake? IIRC random padding is usually frowned upon. So if it's the latter, I am not sure it's worth to add this (arguably) peculiar padding scheme.
@newpavlov I added the feature iso-10126.
This is just for completeness sake.
I was working on a personal project and I decided to switch the Padding implementation to a generics P (Iso10126 is a possibility)... But really, I just need PKCS#7.
Since ISO 10126 fits somewhat poorly into block-padding, I think it's better to simply omit it. If someone actually will need to use it in practice, then it can be implemented fairly easily outside of block-padding, our trait design allows to do it without much pain. Especially considering that the proposed implementation could be not flexible enough (e.g. it does not allow use of PRNG seeded with a fixed seed).
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
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.
This PR adds
rand_coreas a dependency forblock-padding.Maybe ISO 10126 should be put behind a feature?