-
Notifications
You must be signed in to change notification settings - Fork 147
Closed as not planned
Description
Right now [Z] only implements Zeroize if Z: DefaultIsZeroes[0].
While Vec<Z>[1], Box<[Z]>[2], and even [Z; N][3] all implement Zeroize if Z: Zeroize.
The justification for impl<Z: DefaultIsZeros> Zeroize for [Z] is given here:
Lines 455 to 457 in 017165f
| /// This impl can eventually be optimized using an memset intrinsic, | |
| /// such as [`core::intrinsics::volatile_set_memory`]. For that reason the | |
| /// blanket impl on slices is bounded by [`DefaultIsZeroes`]. |
To me it feels like they should all behave ~the same with regard to zeroing
[0] https://docs.rs/zeroize/1.6.0/zeroize/trait.Zeroize.html#impl-Zeroize-for-%5BZ%5D
[1] https://docs.rs/zeroize/1.6.0/zeroize/trait.Zeroize.html#impl-Zeroize-for-Vec%3CZ%3E
[2] https://docs.rs/zeroize/1.6.0/zeroize/trait.Zeroize.html#impl-Zeroize-for-Box%3C%5BZ%5D%3E
[3] https://docs.rs/zeroize/1.6.0/zeroize/trait.Zeroize.html#impl-Zeroize-for-%5BZ;+N%5D
Metadata
Metadata
Assignees
Labels
No labels