1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
//! `Box` types containing secrets

use super::{DebugSecret, Secret};
use alloc::boxed::Box;
use zeroize::Zeroize;

/// `Box` types containing a secret value
#[cfg(feature = "alloc")]
pub type SecretBox<S> = Secret<Box<S>>;

#[cfg(feature = "alloc")]
impl<S: DebugSecret + Zeroize> DebugSecret for Box<S> {
    fn debug_secret() -> &'static str {
        "R3DACT3D::<Box<GENERIC>>::S3CR3T"
    }
}