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
//! # Firebase Cloud Messaging (FCM) Keys Management
//!
//! This module provides secure management of Firebase Cloud Messaging credentials,
//! implementing thread-safe access to API keys and client IDs while ensuring proper
//! memory management and serialization capabilities.
//!
//! ## Features
//! - Thread-safe storage of FCM credentials
//! - Efficient memory management through Arc
//! - Serialization support for persistence
//! - Type-safe key construction
//! - Debug formatting with sensitive data handling
//!
//! ## Usage Example
//! ```rust
//! use citadel_crypt::ratchets::mono::keys::FcmKeys;
//!
//! // Create new FCM keys
//! let keys = FcmKeys::new(
//! "your-api-key-here",
//! "your-client-id-here"
//! );
//!
//! // Access keys (thread-safe)
//! println!("API Key: {}", keys.api_key);
//! println!("Client ID: {}", keys.client_id);
//!
//! // Keys can be cloned efficiently (only clones Arc)
//! let keys_clone = keys.clone();
//!
//! // Serialize for storage if needed
//! let serialized = bincode::serialize(&keys).unwrap();
//! ```
//!
//! ## Important Notes
//! - Uses Arc for efficient sharing across threads
//! - Implements Debug trait with safe credential display
//! - Keys are immutable after creation for security
//! - Supports serialization for persistent storage
//!
//! ## Related Components
//! - [`FcmClient`](super::client::FcmClient): FCM client implementation
//! - [`FcmMessage`](super::message::FcmMessage): FCM message structure
//! - Firebase Cloud Messaging service integration
use Formatter;
use ;
use Deref;
use Arc;