Skip to main content

clear_stack

Function clear_stack 

Source
pub(crate) fn clear_stack()
Expand description

Overwrites the stack region below the caller with zeros.

KDF and hash implementations (Argon2, PBKDF2, HMAC, SHA-256) leave copies of their state and output in stack frames that are popped but not wiped. Call this right after such an operation returns, so the next stack user does not have to happen to overwrite them.