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
//! Error types related to DEK generation and persistence.
//!
//! This module provides error types that may occur during Data Encryption Key (DEK)
//! generation and storage operations. It includes errors for key generation,
//! persistence operations, and CMK-related issues.
use fmt;
use CMKError;
/// Represents an error that can occur during DEK generation.
///
/// This error type is used when key generation operations fail, such as:
/// - Insufficient entropy
/// - Invalid key parameters
/// - Algorithm-specific failures
;
/// Describes errors that can occur while persisting DEKs.
///
/// This enum represents various failure modes when storing or retrieving DEKs:
/// - CMK-related errors (token issues, authentication)
/// - Missing keys
/// - General storage errors
/// Encompasses all possible errors that may be encountered during DEK generation.
///
/// This enum combines all error types that can occur during the DEK generation process:
/// - Persistence errors (storage/retrieval)
/// - CMK-related errors
/// - Key generation errors