logoalt Hacker News

steveklabniklast Sunday at 2:57 AM1 replyview on HN

Zeroing memory is trickier than that, if you want to do it in Rust you should use https://crates.io/crates/zeroize


Replies

IshKebablast Sunday at 7:55 AM

He was pretty close tbf - you just need to use `write_volatile` instead of `write_bytes`.