Skip to main content

reallyme_crypto/secret_material/
zeroization.rs

1// SPDX-FileCopyrightText: Copyright © 2026 ReallyMe LLC. All rights reserved
2//
3// SPDX-License-Identifier: Apache-2.0
4
5/// Zeroization obligation attached to one material owner.
6#[derive(Debug, Clone, Copy, PartialEq, Eq)]
7#[non_exhaustive]
8pub enum ZeroizationPolicy {
9    /// Public material does not require explicit zeroization.
10    NotRequired,
11    /// The owning Rust value must clear its storage on drop.
12    OwnerZeroizesOnDrop,
13    /// The operation borrows storage and the caller remains responsible.
14    CallerRetainsResponsibility,
15    /// Managed memory must be overwritten as soon as practical.
16    ManagedRuntimeBestEffort,
17}