دالة GetPublicKey [SWS_CRYPT_22511] Upstream: RS_CRYPTO_02108, RS_CRYPTO_02115
virtual ara::core::Result< PublicKey::Sptr > GetPublicKey () const noexcept=0;
The interface shall return the public key correspondent to this private key.
الاستخدام
تُستخدم الدالة GetPublicKey للفئة ara::crypto::cryp::PrivateKey للاسترداد المتزامن للمفتاح العام المقابل للمفتاح الخاص [SWS_CRYPT_22511]. ويتم الاستدعاء بدون معلمات على مثيل موجود من PrivateKey. وكقيمة إرجاع، تُرجع الواجهة ara::core::Result<PublicKey::Sptr>، والذي يوفر عند التنفيذ الناجح مؤشراً مشتركاً يشير إلى كائن PublicKey المقابل [SWS_CRYPT_22511].
معالجة الأخطاء والتزامن
لم يتم تحديد رموز خطأ قياسية لهذه الدالة في المواصفات [SWS_CRYPT_22511]. وتتم معالجة الأخطاء عبر كائن الإرجاع من النوع ara::core::Result. ونظراً لأن العملية مصرح عنها كـ noexcept، فإنها تُعتبر آمنة من الاستثناءات (exception safe) [SWS_CRYPT_22511]. بالإضافة إلى ذلك، فإن الدالة مؤهلة كـ const ومحددة على أنها آمنة بالنسبة للخيوط (thread-safe)، مما يجعل عمليات الوصول المتوازية للقراءة عبر خيوط متعددة مسموحاً بها [SWS_CRYPT_22511].
تفاعل
في الإجراءات التشفيرية النموذجية، يُستخدم GetPublicKey بعد إنشاء زوج مفاتيح غير متماثل بواسطة GeneratePrivateKey [SWS_CRYPT_20722]. وأثناء ذلك، يتم نقل رايات الاستخدام المسموح بها للمفتاح الخاص المُنشأ إلى المفتاح العام المقابل (على سبيل المثال، إذن التحقق من التوقيع من إنشاء التوقيع) [SWS_CRYPT_20722]. وتجب التفرقة بين هذه الدالة والواجهة التي تحمل الاسم نفسه في ProtectedKeyImportCtx، والتي تُستخدم لتفريغ المفاتيح العامة المستوردة [SWS_CRYPT_50211].
تم إنشاء ملاحظة الاستخدام هذه آليًا استنادًا إلى AUTOSAR R25-11.
دليل المنفِّذ قيد الإعداد (التعقيد I1)
| Header-Datei | #include "ara/crypto/cryp/cryobj/private_key.h" |
|---|---|
| Scope | class ara::crypto::cryp::PrivateKey |
| Exception-Sicherheit | exception safe |
| Thread-Sicherheit | thread-safe |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| ara::core::Result< PublicKey::Sptr > | A result containing a shared pointer to the public key correspondent to this private key |
Fehler
| Fehlercode | Beschreibung |
|---|---|
| This function does not specify any standardized errors. | |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_CRYPT_22511- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_CRYPT_22511@rel:R25-11#dba94c05- Content hash
dba94c05- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_22511
Status: valid/unmigrated
Version: rel:R25-11#e5f0457b
Versionshistorie & Revisions (1 transition, 8 revision)
- Current State
valid/unmigrated- Reason
- mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
- Campaign
2026-08-13-status-backfill- Active Version
AUTOSAR/AP/record/SWS_CRYPT_22511@rel:R25-11#e5f0457b
Recorded Revisions (8):
- R25-11
rel:R25-11#f0d041e72026-09-30 - R19-11
rel:R19-11#bb931c232026-10-14 - R20-11
rel:R20-11#85846a1e2026-10-14 - R21-11
rel:R21-11#85846a1e2026-10-14 - R22-11
rel:R22-11#99b114f02026-10-14 - R23-11
rel:R23-11#6fdc19552026-10-14 - R24-11
rel:R24-11#a752dbfc2026-10-14 - R25-11
rel:R25-11#e5f0457b2026-10-14 active
Requirement Text as-of this release:
Curation Decisions:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
|---|---|---|---|---|
| 2026-08-13 | tool | none → valid/unmigrated | mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record | 2026-08-13-status-backfill |
gemini-3.8-flash-low· 2026-10-13 · الأصل الألماني