camouchat-core 0.7.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. camouchat_core-0.7.0/PKG-INFO +236 -0
  2. camouchat_core-0.7.0/README.md +201 -0
  3. camouchat_core-0.7.0/pyproject.toml +107 -0
  4. camouchat_core-0.7.0/src/camouchat_core/Encryption/__init__.py +33 -0
  5. camouchat_core-0.7.0/src/camouchat_core/Encryption/decryptor.py +144 -0
  6. camouchat_core-0.7.0/src/camouchat_core/Encryption/encryptor.py +130 -0
  7. camouchat_core-0.7.0/src/camouchat_core/Encryption/key_manager.py +156 -0
  8. camouchat_core-0.7.0/src/camouchat_core/Exceptions/__init__.py +14 -0
  9. camouchat_core-0.7.0/src/camouchat_core/__init__.py +60 -0
  10. camouchat_core-0.7.0/src/camouchat_core/contracts/__init__.py +27 -0
  11. camouchat_core-0.7.0/src/camouchat_core/contracts/chat.py +10 -0
  12. camouchat_core-0.7.0/src/camouchat_core/contracts/chat_processor.py +22 -0
  13. camouchat_core-0.7.0/src/camouchat_core/contracts/interaction_controller.py +29 -0
  14. camouchat_core-0.7.0/src/camouchat_core/contracts/login.py +18 -0
  15. camouchat_core-0.7.0/src/camouchat_core/contracts/media_controller.py +38 -0
  16. camouchat_core-0.7.0/src/camouchat_core/contracts/message.py +16 -0
  17. camouchat_core-0.7.0/src/camouchat_core/contracts/message_processor.py +37 -0
  18. camouchat_core-0.7.0/src/camouchat_core/contracts/storage.py +48 -0
  19. camouchat_core-0.7.0/src/camouchat_core/contracts/ui_config.py +14 -0
  20. camouchat_core-0.7.0/src/camouchat_core/global_metadata/__init__.py +11 -0
  21. camouchat_core-0.7.0/src/camouchat_core/global_metadata/platforms.py +14 -0
  22. camouchat_core-0.7.0/src/camouchat_core/global_metadata/storage_type.py +15 -0
  23. camouchat_core-0.7.0/src/camouchat_core/logger.py +142 -0
  24. camouchat_core-0.7.0/src/camouchat_core/py.typed +1 -0
@@ -0,0 +1,236 @@
1
+ Metadata-Version: 2.4
2
+ Name: camouchat-core
3
+ Version: 0.7.0
4
+ Summary: Anti-detection Account automation SDK. Standardized protocols, async-first, and encrypted storage.
5
+ Keywords: whatsapp,whatsapp-automation,whatsapp-bot,whatsapp-web,whatsapp-api,whatsapp-api-alternative,playwright,camoufox,anti-detection,browser-automation,encrypted-storage,aes-256,e2e-encryption,async,sqlite,postgresql,camouchat,stealth,bypass,chat-bot,agents,automation-framework,web-automation
6
+ Author: BITS-Rohit
7
+ Author-email: BITS-Rohit <rohitguptaradheradhe123@gmail.com>
8
+ License-Expression: MIT
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Topic :: Communications :: Chat
12
+ Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
13
+ Classifier: Topic :: Security :: Cryptography
14
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Framework :: AsyncIO
21
+ Classifier: License :: OSI Approved :: MIT License
22
+ Classifier: Operating System :: OS Independent
23
+ Classifier: Natural Language :: English
24
+ Requires-Dist: cryptography>=41.0.0
25
+ Requires-Dist: colorlog>=6.10.1
26
+ Requires-Dist: concurrent-log-handler>=0.9.29
27
+ Maintainer: BITS-Rohit
28
+ Maintainer-email: BITS-Rohit <rohitguptaradheradhe123@gmail.com>
29
+ Requires-Python: >=3.11
30
+ Project-URL: Bug Tracker, https://github.com/CamouChat-Team/camouchat-core/issues
31
+ Project-URL: Changelog, https://github.com/CamouChat-Team/camouchat-core/releases
32
+ Project-URL: Homepage, https://github.com/CamouChat-Team
33
+ Project-URL: Repository, https://github.com/CamouChat-Team/camouchat-core
34
+ Description-Content-Type: text/markdown
35
+
36
+ <div style="text-align: center;">
37
+ <img src="./assets/text.png" alt="CamouChat Text" />
38
+ </div>
39
+
40
+ > [!IMPORTANT]
41
+ > 🦊 **This is the CamouChat Core SDK Repository.**
42
+ > If you are looking for the main CamouChat project, full ecosystem documentation, or the WhatsApp plugin, please visit our **[Central Repository](https://github.com/CamouChat-Team/CamouChat)**.
43
+
44
+ **`camouchat-core`** is the foundational SDK package. It provides the strict asynchronous interfaces (`typing.Protocol`), end-to-end encrypted storage engines (`AES-GCM-256`), and standardized logging systems used by all CamouChat plugins.
45
+
46
+ <p align= "center">
47
+ <a href="https://pypi.org/project/camouchat/">
48
+ <img src="https://img.shields.io/pypi/v/camouchat?label=camouchat-core&color=green" />
49
+ </a>
50
+ <a href="https://opensource.org/licenses/MIT">
51
+ <img src="https://img.shields.io/badge/License-MIT-yellow.svg" />
52
+ </a>
53
+ </p>
54
+
55
+ ---
56
+
57
+ ## Core SDK Features
58
+
59
+ * **Interface-First Design**: Pure `typing.Protocol` contracts for seamless cross-plugin interoperability.
60
+ * **Encrypted Storage Pipeline**: Built-in 256-bit AES-GCM encryption bridging abstract messages to SQLAlchemy.
61
+ * **Database Agnostic**: `SQLAlchemyStorage` supports SQLite, PostgreSQL, and MySQL completely natively.
62
+ * **Unified Metadata**: Centralized enums (`Platform`, `StorageType`, `MediaType`) ensures consistency.
63
+ * **Concurrent Logging**: Automatic structured, thread-safe, colored console & rotating file logging via `LoggerFactory`.
64
+
65
+ ---
66
+
67
+ ## Installation
68
+
69
+ ```bash
70
+ uv add camouchat-core
71
+ ```
72
+ *(If you are building an agent, you likely want to install `camouchat-whatsapp` instead, which includes this core SDK automatically).*
73
+
74
+ ---
75
+
76
+ ## Installation
77
+
78
+ > 🚀 CamouChat v0.7 is on PyPI
79
+
80
+ ### Using `uv` (Recommended)
81
+
82
+ ```bash
83
+ uv add camouchat-core
84
+ ```
85
+
86
+ > If installing the full stack with browser support:
87
+ ```bash
88
+ uv add camouchat-whatsapp "camoufox[geoip]"
89
+ uv run python -m camoufox fetch
90
+ ```
91
+
92
+ ### Using `pip`
93
+
94
+ ```bash
95
+ pip install camouchat-core
96
+ ```
97
+
98
+ > If installing with full browser + WhatsApp support:
99
+ ```bash
100
+ pip install camouchat-whatsapp "camoufox[geoip]"
101
+ python -m camoufox fetch
102
+ ```
103
+
104
+ > [!WARNING]
105
+ > `camoufox fetch` downloads the hardened Firefox binary used by [Camoufox](https://camoufox.com/). This is a **one-time setup step** and cannot be automated via `uv sync`.
106
+
107
+ ---
108
+
109
+ ## Documentation & Community
110
+
111
+ - 👉 [Core SDK Docs](https://github.com/CamouChat-Team/camouchat-core/tree/main/docs)
112
+ - 👉 [Browser Plugin](https://github.com/CamouChat-Team/camouchat-browser)
113
+ - 👉 [Browser Plugin Docs](https://github.com/CamouChat-Team/camouchat-browser/tree/main/docs)
114
+ - 👉 [WhatsApp Plugin](https://github.com/CamouChat-Team/camouchat-whatsapp)
115
+ - 👉 [WhatsApp Plugin Docs](https://github.com/CamouChat-Team/camouchat-whatsapp/tree/main/docs)
116
+ - 👉 [Code of Conduct](https://github.com/CamouChat-Team/camouchat-core/blob/main/CODE_OF_CONDUCT.md)
117
+ - 👉 [Changelog](https://github.com/CamouChat-Team/camouchat-core/releases)
118
+
119
+ ---
120
+
121
+ ## Roadmap
122
+
123
+ ### v0.7 — Plugin Architecture
124
+ - Decoupled `core`, `browser`, and `whatsapp` packages
125
+ - Centralized logging via `LoggerFactory`
126
+ - Standardized Protocol contracts
127
+
128
+
129
+ ## FAQ
130
+
131
+ **Will I get banned?**
132
+ Rare but possible. Use rate limiting. Avoid spam. Soft bans (logout) are more common than number bans.
133
+
134
+ **Can I use this for spam?**
135
+ No. Use at your own risk.
136
+
137
+ **Why not WhatsApp Business API?**
138
+
139
+ * Template restrictions
140
+ * Approval process
141
+ * Costs per message
142
+ * Limited flexibility
143
+
144
+ ---
145
+
146
+ ## License
147
+
148
+ MIT — see [LICENSE](https://github.com/CamouChat-Team/camouchat-core/blob/main/LICENSE)
149
+
150
+ ---
151
+
152
+ ## ⚖️ Security & Ethics
153
+
154
+ CamouChat's strict policy regarding acceptable automation, anti-spam, and stealth disclaimers can be found in our central ecosystem hub:
155
+
156
+ 👉 **[SECURITY.md](https://github.com/CamouChat-Team/CamouChat/blob/main/SECURITY.md)**
157
+
158
+ ## Thanks to all the Contributors
159
+
160
+ <!-- readme: contributors -start -->
161
+ <table>
162
+ <tbody>
163
+ <tr>
164
+ <td align="center">
165
+ <a href="https://github.com/BITS-Rohit">
166
+ <img src="https://avatars.githubusercontent.com/u/125949183?v=4" width="60;" alt="BITS-Rohit"/>
167
+ <br />
168
+ <sub><b>Ivy </b></sub>
169
+ </a>
170
+ </td>
171
+ <td align="center">
172
+ <a href="https://github.com/bibhupradhanofficial">
173
+ <img src="https://avatars.githubusercontent.com/u/77357902?v=4" width="60;" alt="bibhupradhanofficial"/>
174
+ <br />
175
+ <sub><b>Bibhu Pradhan</b></sub>
176
+ </a>
177
+ </td>
178
+ <td align="center">
179
+ <a href="https://github.com/xinss-plus">
180
+ <img src="https://avatars.githubusercontent.com/u/260048405?v=4" width="60;" alt="xinss-plus"/>
181
+ <br />
182
+ <sub><b>Xinss</b></sub>
183
+ </a>
184
+ </td>
185
+ <td align="center">
186
+ <a href="https://github.com/Adez017">
187
+ <img src="https://avatars.githubusercontent.com/u/142787780?v=4" width="60;" alt="Adez017"/>
188
+ <br />
189
+ <sub><b>aditya singh rathore</b></sub>
190
+ </a>
191
+ </td>
192
+ <td align="center">
193
+ <a href="https://github.com/AnkithaMadhyastha">
194
+ <img src="https://avatars.githubusercontent.com/u/174180608?v=4" width="60;" alt="AnkithaMadhyastha"/>
195
+ <br />
196
+ <sub><b>AnkithaMadhyastha</b></sub>
197
+ </a>
198
+ </td>
199
+ <td align="center">
200
+ <a href="https://github.com/dharapandya85">
201
+ <img src="https://avatars.githubusercontent.com/u/109461918?v=4" width="60;" alt="dharapandya85"/>
202
+ <br />
203
+ <sub><b>Dhara Pandya </b></sub>
204
+ </a>
205
+ </td>
206
+ <td align="center">
207
+ <a href="https://github.com/Vaishnav-Sabari-Girish">
208
+ <img src="https://avatars.githubusercontent.com/u/88036970?v=4" width="60;" alt="Vaishnav-Sabari-Girish"/>
209
+ <br />
210
+ <sub><b>Vaishnav-sabari-girish</b></sub>
211
+ </a>
212
+ </td>
213
+ <td align="center">
214
+ <a href="https://github.com/OVERDOZZZE">
215
+ <img src="https://avatars.githubusercontent.com/u/113797353?v=4" width="60;" alt="OVERDOZZZE"/>
216
+ <br />
217
+ <sub><b>Saparbekov Nurdan</b></sub>
218
+ </a>
219
+ </td>
220
+ <td align="center">
221
+ <a href="https://github.com/magic-peach">
222
+ <img src="https://avatars.githubusercontent.com/u/146705736?v=4" width="60;" alt="magic-peach"/>
223
+ <br />
224
+ <sub><b>Akanksha Trehun</b></sub>
225
+ </a>
226
+ </td>
227
+ </tr>
228
+ <tbody>
229
+ </table>
230
+ <!-- readme: contributors -end -->
231
+
232
+ ---
233
+
234
+ <p align="center">
235
+ Built with ❤️ by BITS-Rohit and the CamouChat community
236
+ </p>
@@ -0,0 +1,201 @@
1
+ <div style="text-align: center;">
2
+ <img src="./assets/text.png" alt="CamouChat Text" />
3
+ </div>
4
+
5
+ > [!IMPORTANT]
6
+ > 🦊 **This is the CamouChat Core SDK Repository.**
7
+ > If you are looking for the main CamouChat project, full ecosystem documentation, or the WhatsApp plugin, please visit our **[Central Repository](https://github.com/CamouChat-Team/CamouChat)**.
8
+
9
+ **`camouchat-core`** is the foundational SDK package. It provides the strict asynchronous interfaces (`typing.Protocol`), end-to-end encrypted storage engines (`AES-GCM-256`), and standardized logging systems used by all CamouChat plugins.
10
+
11
+ <p align= "center">
12
+ <a href="https://pypi.org/project/camouchat/">
13
+ <img src="https://img.shields.io/pypi/v/camouchat?label=camouchat-core&color=green" />
14
+ </a>
15
+ <a href="https://opensource.org/licenses/MIT">
16
+ <img src="https://img.shields.io/badge/License-MIT-yellow.svg" />
17
+ </a>
18
+ </p>
19
+
20
+ ---
21
+
22
+ ## Core SDK Features
23
+
24
+ * **Interface-First Design**: Pure `typing.Protocol` contracts for seamless cross-plugin interoperability.
25
+ * **Encrypted Storage Pipeline**: Built-in 256-bit AES-GCM encryption bridging abstract messages to SQLAlchemy.
26
+ * **Database Agnostic**: `SQLAlchemyStorage` supports SQLite, PostgreSQL, and MySQL completely natively.
27
+ * **Unified Metadata**: Centralized enums (`Platform`, `StorageType`, `MediaType`) ensures consistency.
28
+ * **Concurrent Logging**: Automatic structured, thread-safe, colored console & rotating file logging via `LoggerFactory`.
29
+
30
+ ---
31
+
32
+ ## Installation
33
+
34
+ ```bash
35
+ uv add camouchat-core
36
+ ```
37
+ *(If you are building an agent, you likely want to install `camouchat-whatsapp` instead, which includes this core SDK automatically).*
38
+
39
+ ---
40
+
41
+ ## Installation
42
+
43
+ > 🚀 CamouChat v0.7 is on PyPI
44
+
45
+ ### Using `uv` (Recommended)
46
+
47
+ ```bash
48
+ uv add camouchat-core
49
+ ```
50
+
51
+ > If installing the full stack with browser support:
52
+ ```bash
53
+ uv add camouchat-whatsapp "camoufox[geoip]"
54
+ uv run python -m camoufox fetch
55
+ ```
56
+
57
+ ### Using `pip`
58
+
59
+ ```bash
60
+ pip install camouchat-core
61
+ ```
62
+
63
+ > If installing with full browser + WhatsApp support:
64
+ ```bash
65
+ pip install camouchat-whatsapp "camoufox[geoip]"
66
+ python -m camoufox fetch
67
+ ```
68
+
69
+ > [!WARNING]
70
+ > `camoufox fetch` downloads the hardened Firefox binary used by [Camoufox](https://camoufox.com/). This is a **one-time setup step** and cannot be automated via `uv sync`.
71
+
72
+ ---
73
+
74
+ ## Documentation & Community
75
+
76
+ - 👉 [Core SDK Docs](https://github.com/CamouChat-Team/camouchat-core/tree/main/docs)
77
+ - 👉 [Browser Plugin](https://github.com/CamouChat-Team/camouchat-browser)
78
+ - 👉 [Browser Plugin Docs](https://github.com/CamouChat-Team/camouchat-browser/tree/main/docs)
79
+ - 👉 [WhatsApp Plugin](https://github.com/CamouChat-Team/camouchat-whatsapp)
80
+ - 👉 [WhatsApp Plugin Docs](https://github.com/CamouChat-Team/camouchat-whatsapp/tree/main/docs)
81
+ - 👉 [Code of Conduct](https://github.com/CamouChat-Team/camouchat-core/blob/main/CODE_OF_CONDUCT.md)
82
+ - 👉 [Changelog](https://github.com/CamouChat-Team/camouchat-core/releases)
83
+
84
+ ---
85
+
86
+ ## Roadmap
87
+
88
+ ### v0.7 — Plugin Architecture
89
+ - Decoupled `core`, `browser`, and `whatsapp` packages
90
+ - Centralized logging via `LoggerFactory`
91
+ - Standardized Protocol contracts
92
+
93
+
94
+ ## FAQ
95
+
96
+ **Will I get banned?**
97
+ Rare but possible. Use rate limiting. Avoid spam. Soft bans (logout) are more common than number bans.
98
+
99
+ **Can I use this for spam?**
100
+ No. Use at your own risk.
101
+
102
+ **Why not WhatsApp Business API?**
103
+
104
+ * Template restrictions
105
+ * Approval process
106
+ * Costs per message
107
+ * Limited flexibility
108
+
109
+ ---
110
+
111
+ ## License
112
+
113
+ MIT — see [LICENSE](https://github.com/CamouChat-Team/camouchat-core/blob/main/LICENSE)
114
+
115
+ ---
116
+
117
+ ## ⚖️ Security & Ethics
118
+
119
+ CamouChat's strict policy regarding acceptable automation, anti-spam, and stealth disclaimers can be found in our central ecosystem hub:
120
+
121
+ 👉 **[SECURITY.md](https://github.com/CamouChat-Team/CamouChat/blob/main/SECURITY.md)**
122
+
123
+ ## Thanks to all the Contributors
124
+
125
+ <!-- readme: contributors -start -->
126
+ <table>
127
+ <tbody>
128
+ <tr>
129
+ <td align="center">
130
+ <a href="https://github.com/BITS-Rohit">
131
+ <img src="https://avatars.githubusercontent.com/u/125949183?v=4" width="60;" alt="BITS-Rohit"/>
132
+ <br />
133
+ <sub><b>Ivy </b></sub>
134
+ </a>
135
+ </td>
136
+ <td align="center">
137
+ <a href="https://github.com/bibhupradhanofficial">
138
+ <img src="https://avatars.githubusercontent.com/u/77357902?v=4" width="60;" alt="bibhupradhanofficial"/>
139
+ <br />
140
+ <sub><b>Bibhu Pradhan</b></sub>
141
+ </a>
142
+ </td>
143
+ <td align="center">
144
+ <a href="https://github.com/xinss-plus">
145
+ <img src="https://avatars.githubusercontent.com/u/260048405?v=4" width="60;" alt="xinss-plus"/>
146
+ <br />
147
+ <sub><b>Xinss</b></sub>
148
+ </a>
149
+ </td>
150
+ <td align="center">
151
+ <a href="https://github.com/Adez017">
152
+ <img src="https://avatars.githubusercontent.com/u/142787780?v=4" width="60;" alt="Adez017"/>
153
+ <br />
154
+ <sub><b>aditya singh rathore</b></sub>
155
+ </a>
156
+ </td>
157
+ <td align="center">
158
+ <a href="https://github.com/AnkithaMadhyastha">
159
+ <img src="https://avatars.githubusercontent.com/u/174180608?v=4" width="60;" alt="AnkithaMadhyastha"/>
160
+ <br />
161
+ <sub><b>AnkithaMadhyastha</b></sub>
162
+ </a>
163
+ </td>
164
+ <td align="center">
165
+ <a href="https://github.com/dharapandya85">
166
+ <img src="https://avatars.githubusercontent.com/u/109461918?v=4" width="60;" alt="dharapandya85"/>
167
+ <br />
168
+ <sub><b>Dhara Pandya </b></sub>
169
+ </a>
170
+ </td>
171
+ <td align="center">
172
+ <a href="https://github.com/Vaishnav-Sabari-Girish">
173
+ <img src="https://avatars.githubusercontent.com/u/88036970?v=4" width="60;" alt="Vaishnav-Sabari-Girish"/>
174
+ <br />
175
+ <sub><b>Vaishnav-sabari-girish</b></sub>
176
+ </a>
177
+ </td>
178
+ <td align="center">
179
+ <a href="https://github.com/OVERDOZZZE">
180
+ <img src="https://avatars.githubusercontent.com/u/113797353?v=4" width="60;" alt="OVERDOZZZE"/>
181
+ <br />
182
+ <sub><b>Saparbekov Nurdan</b></sub>
183
+ </a>
184
+ </td>
185
+ <td align="center">
186
+ <a href="https://github.com/magic-peach">
187
+ <img src="https://avatars.githubusercontent.com/u/146705736?v=4" width="60;" alt="magic-peach"/>
188
+ <br />
189
+ <sub><b>Akanksha Trehun</b></sub>
190
+ </a>
191
+ </td>
192
+ </tr>
193
+ <tbody>
194
+ </table>
195
+ <!-- readme: contributors -end -->
196
+
197
+ ---
198
+
199
+ <p align="center">
200
+ Built with ❤️ by BITS-Rohit and the CamouChat community
201
+ </p>
@@ -0,0 +1,107 @@
1
+ [build-system]
2
+ requires = ["uv_build>=0.6.6,<0.7.0"]
3
+ build-backend = "uv_build"
4
+
5
+ [project]
6
+ name = "camouchat-core"
7
+ version = "0.7.0"
8
+ description = "Anti-detection Account automation SDK. Standardized protocols, async-first, and encrypted storage."
9
+ readme = "README.md"
10
+ requires-python = ">=3.11"
11
+ license = "MIT"
12
+
13
+ authors = [{ name = "BITS-Rohit", email = "rohitguptaradheradhe123@gmail.com" }]
14
+ maintainers = [{ name = "BITS-Rohit", email = "rohitguptaradheradhe123@gmail.com" }]
15
+
16
+ keywords = [
17
+ "whatsapp",
18
+ "whatsapp-automation",
19
+ "whatsapp-bot",
20
+ "whatsapp-web",
21
+ "whatsapp-api",
22
+ "whatsapp-api-alternative",
23
+ "playwright",
24
+ "camoufox",
25
+ "anti-detection",
26
+ "browser-automation",
27
+ "encrypted-storage",
28
+ "aes-256",
29
+ "e2e-encryption",
30
+ "async",
31
+ "sqlite",
32
+ "postgresql",
33
+ "camouchat",
34
+ "stealth",
35
+ "bypass",
36
+ "chat-bot",
37
+ "agents",
38
+ "automation-framework",
39
+ "web-automation"
40
+ ]
41
+
42
+ classifiers = [
43
+ "Development Status :: 4 - Beta",
44
+ "Intended Audience :: Developers",
45
+ "Topic :: Communications :: Chat",
46
+ "Topic :: Internet :: WWW/HTTP :: Browsers",
47
+ "Topic :: Security :: Cryptography",
48
+ "Topic :: Software Development :: Libraries :: Python Modules",
49
+ "Programming Language :: Python :: 3",
50
+ "Programming Language :: Python :: 3.11",
51
+ "Programming Language :: Python :: 3.12",
52
+ "Programming Language :: Python :: 3.13",
53
+ "Programming Language :: Python :: 3.14",
54
+ "Framework :: AsyncIO",
55
+ "License :: OSI Approved :: MIT License",
56
+ "Operating System :: OS Independent",
57
+ "Natural Language :: English",
58
+ ]
59
+
60
+ dependencies = [
61
+ "cryptography>=41.0.0",
62
+ "colorlog>=6.10.1",
63
+ "concurrent-log-handler>=0.9.29",
64
+ ]
65
+
66
+ [project.urls]
67
+ Homepage = "https://github.com/CamouChat-Team"
68
+ Repository = "https://github.com/CamouChat-Team/camouchat-core"
69
+ "Bug Tracker" = "https://github.com/CamouChat-Team/camouchat-core/issues"
70
+ Changelog = "https://github.com/CamouChat-Team/camouchat-core/releases"
71
+
72
+
73
+ [tool.pytest.ini_options]
74
+ minversion = "7.0"
75
+ testpaths = ["tests"]
76
+ asyncio_mode = "auto"
77
+ addopts = "--cov=camouchat_core --cov-report=term-missing"
78
+
79
+ [tool.coverage.run]
80
+ source = ["camouchat_core"]
81
+
82
+ [tool.black]
83
+ line-length = 100
84
+ target-version = ["py311", "py312", "py313", "py314"]
85
+
86
+ [tool.mypy]
87
+ python_version = "3.11"
88
+ ignore_missing_imports = true
89
+
90
+ [tool.deptry]
91
+ known_first_party = ["camouchat_core"]
92
+
93
+ [tool.deptry.per_rule_ignores]
94
+ DEP002 = ["concurrent_log_handler", "colorlog"]
95
+ DEP003 = ["camouchat_core"]
96
+
97
+ [dependency-groups]
98
+ dev = [
99
+ "black>=26.3.1",
100
+ "deptry>=0.25.1",
101
+ "mypy>=1.20.0",
102
+ "ruff>=0.15.8",
103
+ "pytest>=7.4.0",
104
+ "pytest-asyncio>=0.21.0",
105
+ "pytest-cov>=4.1.0",
106
+ "pytest-mock>=3.11.0",
107
+ ]
@@ -0,0 +1,33 @@
1
+ """
2
+ Encryption package for camouchat SDK.
3
+
4
+ Provides secure encryption and decryption for platform messages using:
5
+ - AES-256-GCM for authenticated encryption
6
+ - PBKDF2-HMAC-SHA256 for key derivation (480,000 iterations, OWASP recommended)
7
+ - Per-user encryption keys
8
+
9
+ Usage:
10
+ from camouchat.Encryption import MessageEncryptor, MessageDecryptor, KeyManager
11
+
12
+ # Generate key from password
13
+ key_manager = KeyManager()
14
+ salt, key = key_manager.derive_key_and_salt("user_password")
15
+
16
+ # Encrypt message
17
+ encryptor = MessageEncryptor(key)
18
+ nonce, ciphertext = encryptor.encrypt_message("Hello, World!")
19
+
20
+ # Decrypt message
21
+ decryptor = MessageDecryptor(key)
22
+ plaintext = decryptor.decrypt_message(nonce, ciphertext)
23
+ """
24
+
25
+ from .encryptor import MessageEncryptor
26
+ from .decryptor import MessageDecryptor
27
+ from .key_manager import KeyManager
28
+
29
+ __all__ = [
30
+ "MessageEncryptor",
31
+ "MessageDecryptor",
32
+ "KeyManager",
33
+ ]