1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! Alignment wrapper types for forcing specific memory alignment.
//!
//! This module provides newtype wrappers that force specific alignment
//! for the inner type. This is useful when you need to ensure that
//! encrypted data has a particular memory alignment.
//!
//! # Types
//!
//! - [`Aligned8`]: Forces 8-byte alignment
//! - [`Aligned16`]: Forces 16-byte alignment
//!
//! # Example
//!
//! ```rust
//! use const_secret::{
//! align::Aligned16,
//! Encrypted, ByteArray,
//! drop_strategy::Zeroize,
//! xor::Xor,
//! };
//!
//! // Ensure the encrypted data is 16-byte aligned
//! const SECRET: Aligned16<Encrypted<Xor<0xAA, Zeroize>, ByteArray, 16>> =
//! Aligned16(Encrypted::<Xor<0xAA, Zeroize>, ByteArray, 16>::new([0u8; 16]));
//!
//! fn main() {
//! // Access the inner encrypted data
//! let _inner: &Encrypted<Xor<0xAA, Zeroize>, ByteArray, 16> = &SECRET.0;
//! }
//! ```
;
;