Skip to content

Conversation

@conradludgate
Copy link
Contributor

@conradludgate conradludgate commented Mar 4, 2025

This resolves #566.

There was an open question regarding alignment. I couldn't demonstrate any significant performance benefit from unaligned allocations, so I skipped that here.

I wasn't sure what error to return. I decided not to introduce a breaking change here with a new error variant, but perhaps that is desired.

@conradludgate conradludgate changed the title add BlockArray abstraction to handle fallible allocations, with alloc_zeroed as an optimisation Add BlockArray abstraction to handle fallible allocations Mar 4, 2025
@conradludgate conradludgate force-pushed the argon2-fallible-alloc branch from 0fec952 to c28f547 Compare March 4, 2025 11:41
@conradludgate conradludgate force-pushed the argon2-fallible-alloc branch from c28f547 to 4f74add Compare March 4, 2025 11:42
@newpavlov
Copy link
Member

Sorry, I had my own draft. I published it as #568. I borrowed some things from your PR (e.g. I did not know about Layout::array), but otherwise I think it's better to continue development of this feature there.

@newpavlov newpavlov closed this Mar 4, 2025
@conradludgate
Copy link
Contributor Author

No harm done :)

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.

Argon2::hash_password_into should use fallible memory allocations

2 participants