Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement ZeroizeOnDrop for containers #703

Merged
merged 1 commit into from Jan 6, 2022

Conversation

daxpedda
Copy link
Contributor

@daxpedda daxpedda commented Jan 6, 2022

This implements ZeroizeOnDrop for the following containers if all elements in that container also implement ZeroizeOnDrop:

  • [Z; N]
  • Option<Z>
  • Vec<Z>
  • Box<[Z]>
  • (A, ) up to ten elements

Additionally implemented for the following zero-sized types:

  • PhantomData<Z>
  • PhantomPinned
  • ()

This required to remove the Drop constraint from ZeroizeOnDrop.

@tarcieri tarcieri merged commit 3d9cd39 into RustCrypto:master Jan 6, 2022
@tarcieri
Copy link
Member

tarcieri commented Jan 6, 2022

Nice! Thank you

@tarcieri tarcieri mentioned this pull request Jan 14, 2022
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.

None yet

2 participants