You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Secret<T> wrapper requires T to implement Zeroize. Would be nice to support ZeroizeOnDrop, that is T need to implement either Zeroize or ZeroizeOnDrop. Consider the example which currently doesn't work:
use secrecy::Secret;use zeroize::{Zeroize,ZeroizeOnDrop};pubstructSecretKey([u8;32]);implZeroizeOnDropforSecretKey{}implDropforSecretKey{fndrop(&mutself){self.0.zeroize();}}structConfig{// doesn't workkey:Secret<SecretKey>,}
Would be helpful in case library implements only ZeroizeOnDrop and not Zeroize (e.g. ed25519-dalek)
Currently
Secret<T>
wrapper requiresT
to implementZeroize
. Would be nice to supportZeroizeOnDrop
, that isT
need to implement eitherZeroize
orZeroizeOnDrop
. Consider the example which currently doesn't work:Would be helpful in case library implements only
ZeroizeOnDrop
and notZeroize
(e.g.ed25519-dalek
)Probably this can be done similar to how
#[derive(ZeroizeOnDrop)]
is implementedThe text was updated successfully, but these errors were encountered: