feat(kik): Implement document ID encryption for KİK v2 API
Reverse engineered the AES-256-CBC encryption used by KİK's Angular web application to generate document URL hashes from numeric IDs. Key findings: - Algorithm: AES-256-CBC with PKCS7 padding - Key location: ekapv2.kik.gov.tr module 21554 (environment config) - Output format: IV (16 bytes hex) + Ciphertext (16 bytes hex) = 64 chars Changes: - Added encrypt_document_id() static method to KikV2ApiClient - Updated get_document_markdown() to auto-encrypt numeric gundemMaddesiId - Added cryptography>=44.0.0 dependency for AES encryption - Both primary and fallback URL paths now support encryption This enables direct document retrieval from numeric search result IDs without requiring the pre-encrypted hash from the web interface.
This commit is contained in:
@@ -29,6 +29,7 @@ dependencies = [
|
||||
"fastmcp>=2.10.5",
|
||||
"pypdf>=5.5.0",
|
||||
"fastapi>=0.115.14",
|
||||
"cryptography>=44.0.0",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
|
||||
Reference in New Issue
Block a user