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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
//! Steganography strategy configuration for payload embedding.
//!
//! This module defines the strategy types used to configure how payloads are embedded
//! into PNG images. Currently supports LSB (Least Significant Bit) steganography
//! with plans for additional algorithms in the future.
use crateLSBConfig;
/// Wire format payload size type for cross-platform compatibility.
///
/// Uses 32-bit unsigned integer to ensure consistent behavior across
/// different architectures and platforms.
pub type PayloadSize = u32;
/// Steganography embedding strategy selection.
///
/// This enum determines which steganography algorithm will be used to embed
/// payload data into PNG images. Each variant contains its own configuration
/// options specific to that algorithm.
///
/// # Supported Strategies
///
/// ## LSB (Least Significant Bit)
/// The LSB strategy modifies the least significant bits of image pixel data
/// to encode payload information. This provides a good balance between
/// capacity and visual imperceptibility.
///
/// # Examples
///
/// ## Basic LSB Strategy
/// ```rust
/// use pnger::strategy::{Strategy, lsb::LSBConfig};
///
/// // Use default LSB configuration (random pattern)
/// let strategy = Strategy::default();
///
/// // Or create explicitly with linear pattern
/// let strategy = Strategy::LSB(LSBConfig::linear());
/// ```
///
/// ## Custom LSB Configuration
/// ```rust
/// use pnger::strategy::{Strategy, lsb::{LSBConfig, BitIndex}};
///
/// // Random pattern with password-derived seed
/// let strategy = Strategy::LSB(
/// LSBConfig::random()
/// .with_password("secret_key".to_string())
/// .with_bit_index(BitIndex::Bit1)
/// );
/// ```
///
/// # Security Considerations
///
/// - **Linear patterns** are faster but more detectable by statistical analysis
/// - **Random patterns** provide better security at the cost of some performance
/// - **Password-derived seeds** don't require embedding seed data in the image
/// - **Auto-generated seeds** provide maximum entropy but must be stored in the image