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
//! String-based key generation for testing.
//!
//! This module provides a simple key generation mechanism for testing and
//! development purposes. It converts strings into key material.
//!
//! # Warning
//!
//! This implementation is not cryptographically secure and should only be
//! used for testing purposes. It is only available with the "debug" feature.
use crateDEKKeyGenerator;
use crateGenerateKeyError;
/// A debug-only key generator that converts a string into bytes for use as a key.
///
/// This generator:
/// - Converts strings to key bytes
/// - Provides deterministic output
/// - Simplifies testing scenarios
/// - Enables reproducible tests
///
/// # Warning
///
/// This generator is intended for testing only and should not be used in
/// production environments because:
/// - It is not cryptographically secure
/// - Key material may be predictable
/// - String conversion may not preserve entropy
/// - Key lengths are not guaranteed
///
/// # Example
/// ```no_run
/// use hyokashi::StringGenerator;
///
/// // Create a test generator
/// let generator = StringGenerator::new("my-test-key".to_string());
/// let key = generator.generate_key()?;
///
/// // Keys are deterministic based on the input string
/// let same_key = generator.generate_key()?;
/// assert_eq!(key, same_key);
/// # Ok::<(), Box<dyn std::error::Error>>(())
/// ```
String);