DAT C / C++ লাইব্রেরি
GitHubInstallation
Until it is officially merged into vcpkg, you will need to manually install and integrate the project using this repository.
https://github.com/microsoft/vcpkg/pull/52088
version: 4.7.0
দ্রুত শুরু
এই সম্পূর্ণ flow CMS থেকে certificates আনে, JSON data-সহ DAT তৈরি করে এবং যাচাই করে।
ধাপে ধাপে
1. CMS-এ সংযোগ
Issuing service full certificates-এর token ব্যবহার করে। startup-এ সঙ্গে সঙ্গে synchronize করলে certificates পাওয়ার আগে issuance হয় না।
2. DAT ইস্যু
এই উদাহরণে public JSON plain-এ এবং protected user information JSON হিসেবে secure-এ রাখা হয়।
3. DAT যাচাই
parse expiration ও signature যাচাই করে, তারপর secure decrypt করে। সফল verification-এর পরের payload-ই ব্যবহার করুন।
মূল functions
| Function | উদ্দেশ্য |
|---|---|
dat_cms_manager_sync | Certificates সঙ্গে সঙ্গে synchronize করে। |
dat_cms_manager_issue | DAT string allocate করে ফেরায়। |
dat_cms_manager_parse | Verified payload allocate করে ফেরায়। |
dat_cms_manager_last_error | শেষ synchronization error ফেরায়। |
Data regions
plain: signed কিন্তু encrypted নয় এমন bytes।secure: encrypted bytes।payload:parseসফল হলেই বিশ্বাস করুন।
JSON ছাড়াও বিকল্প
উদাহরণে পরিচিত JSON ব্যবহৃত। দ্রুত processing-এর জন্য binary data JSON serialization ও parsing এড়িয়ে data size কমাতে পারে।
Simple values text হিসেবে বা structured data Protobuf/MessagePack-এর মতো binary format-এ plain ও secure-এ রাখুন।
বর্তমান C issuance API NUL-terminated strings নেয়। arbitrary bytes Base64Url বা Hex-এ encode করে payload lengths দিয়ে result পড়ুন।
Verify-only services
DAT issue না করা service verify-only option ও verify-only token ব্যবহার করে এবং শুধু parse call করে।
Shutdown ও errors
নিজ নিজ cleanup function দিয়ে dat, payload ও cms release করুন।
Error messages-এর বদলে error codes ও retry classifications ব্যবহার করুন।