Skip to content

Conversation

@FssAy
Copy link
Contributor

@FssAy FssAy commented Feb 15, 2023

I am not 100% sure, but I think the length of provided string s should be lower or equal to the MAX_LENGTH.

When implementing some algorithm that required 64 bytes long salt I couldn't make a new SaltString structure due to this issue and simple change from < to the <= operator fixed it. What is more, function Salt::new allows for the s string to be exactly 64 bytes (MAX_LENGTH) long.

I did not find any opened or closed issues related to this matter, so that's why I am not sure if it is a bug or a feature.

Allow the length of `s` to be exactly the same amount as `MAX_LENGTH` value.
Copy link
Member

@tarcieri tarcieri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@tarcieri tarcieri merged commit bf9cf0f into RustCrypto:master Feb 17, 2023
@tarcieri tarcieri mentioned this pull request Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants