फ़ंक्शन Decapsulate [SWS_CRYPT_21412] Upstream: RS_CRYPTO_02102, RS_CRYPTO_02108, RS_CRYPTO_02115
virtual ara::core::Result< SymmetricKey::Sptr > Decapsulate (ReadOnly MemRegion encapsulatedKey, AlgId algId, AllowedUsageFlags allowed Usage) const noexcept=0;
Decapsulate the keying data into a new SymmetricKey.
उपयोग
क्लास ara::crypto::cryp::KeyDecapsulatorPrivateCtx की विधि Decapsulate कुंजी डेटा को एक नए सममित कुंजी ऑब्जेक्ट में सिंक्रोनस रूप से डीकैप्सुलेट करने का कार्य करती है [SWS_CRYPT_21412]। यह इनकैप्सुलेटेड कुंजी युक्त एक मेमोरी क्षेत्र (encapsulatedKey), लक्ष्य एल्गोरिदम का पहचानकर्ता (algId) और उपयोग फ़्लैग (allowedUsage) स्वीकार करती है, जो लक्ष्य कुंजी के अनुमत रूपांतरण प्रकारों को निर्धारित करते हैं [SWS_CRYPT_21412]। कॉल को noexcept और exception safe के रूप में निर्दिष्ट किया गया है और यह परिणाम को सिंक्रोनस रूप से ara::core::Result<SymmetricKey::Sptr> में लौटाता है [SWS_CRYPT_21412]।
त्रुटि प्रबंधन
त्रुटि की स्थिति में, फ़ंक्शन रोलबैक सिमेंटिक्स सुनिश्चित करता है [SWS_CRYPT_21412]। संभावित त्रुटि कारणों में शामिल हैं:
UninitializedContext: संदर्भ को अभी तक किसी निजी कुंजी के साथ प्रारंभ नहीं किया गया है [SWS_CRYPT_21412]।CryptoErrc::kInvalidArgument: इनपुट बफ़रencapsulatedKeyका प्रारूप अमान्य है [SWS_CRYPT_21412]।ara::crypto::CryptoErrc::kUnknownIdentifier: पास किया गया पहचानकर्ताalgIdसमर्थित नहीं है [SWS_CRYPT_21412]।ara::crypto::CryptoErrc::kIncompatibleArguments:allowedUsageमें फ़्लैगalgIdया कुंजी प्रकार के साथ असंगत हैं, याalgId,encapsulatedKeyसे मेल नहीं खाता है [SWS_CRYPT_21412]।ara::crypto::CryptoErrc::kUsageViolation: निजी कुंजी की अनुमतियाँkAllowKeyUnwrappingकी अनुमति नहीं देती हैं [SWS_CRYPT_21412]।ara::crypto::CryptoErrc::kBusyResourceयाara::crypto::CryptoErrc::kEmptyKeySlot: एक आवश्यक संसाधन व्यस्त है या एक कॉन्फ़िगर किया गया KeySlot वर्तमान में रिक्त है [SWS_CRYPT_21412]।
समवर्तीता और प्रतिबंध
ऑपरेशन thread-safe है और इसे const के रूप में घोषित किया गया है [SWS_CRYPT_21412]। व्याख्या: ara::crypto::CryptoErrc::kEmptyKeySlot का घटित होना संभवतः यह पूर्वपेक्षा रखता है कि डीकैप्सुलेशन के लिए कॉन्फ़िगर किया गया KeySlot कॉल से पहले मान्य कुंजी सामग्री से भरा होना चाहिए। प्रश्न Q-941ed6a81c1e714c (खुला)
यह उपयोग नोट स्वचालित रूप से तैयार किया गया था और पूरी तरह से AUTOSAR Adaptive R25-11 के विनिर्देश डेटा पर आधारित है।
| Header-Datei | #include "ara/crypto/cryp/key_decapsulator_private_ctx.h" |
|---|---|
| Scope | class ara::crypto::cryp::KeyDecapsulatorPrivateCtx |
| Exception-Sicherheit | exception safe |
| Thread-Sicherheit | thread-safe CryptoErrc::k rollback_semantics |
Parameter (in)
| Parameter | Beschreibung |
|---|---|
| encapsulatedKey | an input buffer containing the encapsulated key |
| algId | the identifier of the target symmetric crypto algorithm |
| allowedUsage | the flags that define a list of allowed transformations’ types in which the target key can be used |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| ara::core::Result<SymmetricKey::Sptr > | a result containing a the decapsulated symmetric key object or an error |
Fehler
| Fehlercode | Beschreibung |
|---|---|
| UninitializedContext | if the context was not initialized by a private key value |
| CryptoErrc::kInvalidArgument | rollback_semantics if the format of encapsulatedKey is invalid |
| ara::crypto::CryptoErrc::kUnknownIdentifier | rollback_semantics if algId has an unsupported value |
| ara::crypto::CryptoErrc::kIncompatibleArguments | rollback_semantics if the allowedUsage is incompatible with the algId or the key type |
| ara::crypto::CryptoErrc::kIncompatibleArguments | rollback_semantics if the algId is incompatible to the encapsulatedKey |
| ara::crypto::CryptoErrc::kBusyResource | rollback_semantics a required resource is busy |
| ara::crypto::CryptoErrc::kEmptyKeySlot | rollback_semantics if a KeySlot was configured that is currently is empty |
| ara::crypto::CryptoErrc::kUsageViolation | rollback_semantics if the allowed usage of the key does not include kAllowKey Unwrapping |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_CRYPT_21412- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_CRYPT_21412@rel:R25-11#eb4f5091- Content hash
eb4f5091- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_21412
Status: valid/unmigrated
Version: rel:R25-11#eae42d09
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_21412@rel:R25-11#eae42d09
Recorded Revisions (8):
- R25-11
rel:R25-11#adc903502026-09-30 - R19-11
rel:R19-11#2a160e442026-10-14 - R20-11
rel:R20-11#b88e4d222026-10-14 - R21-11
rel:R21-11#5336aaad2026-10-14 - R22-11
rel:R22-11#e33519842026-10-14 - R23-11
rel:R23-11#fae6d8942026-10-14 - R24-11
rel:R24-11#807767cc2026-10-14 - R25-11
rel:R25-11#eae42d092026-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 · जर्मन मूल