It's maybe worth adding a ZeroDropCow<'a,T> type that represents either a &'a T or a Box<T> which zeros the Box<T> when dropped. Box is not used by std::borrow::Cow. Ain't clearly useful though since cryptographic material is rarely modified piecemeal.
It's maybe worth adding a
ZeroDropCow<'a,T>
type that represents either a&'a T
or aBox<T>
which zeros theBox<T>
when dropped.Box
is not used bystd::borrow::Cow
. Ain't clearly useful though since cryptographic material is rarely modified piecemeal.