DEENESPTFRRUARHIKOZHNL

क्लास ara::crypto::cryp::EncryptorPublicCtx

[SWS_CRYPT_50173] Upstream: RS_CRYPTO_02201

class EncryptorPublicCtx :             public CryptoContext {...};

Interface for asymmetric encryption.

Header-Datei#include "ara/crypto/cryp/encryptor_public_ctx.h"
Forwarding-Header#include "ara/crypto/crypto_fwd.h"
Scopenamespace ara::crypto::cryp
Basisklasse(n)CryptoContext

उपयोगकर्ता गाइडएआई जनित

एकल चरण में या बहु-भाग स्ट्रीमिंग ऑपरेशन के माध्यम से डेटा को असममित रूप से एन्क्रिप्ट करता है।
एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: 9ba841f18186 उद्गम खुले प्रश्न (2)
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

एकल चरण में या बहु-भाग स्ट्रीमिंग ऑपरेशन के माध्यम से डेटा को असममित रूप से एन्क्रिप्ट करता है।

यह इंटरफ़ेस AUTOSAR Adaptive Platform पर प्लेनटेक्स्ट डेटा के असममित एन्क्रिप्शन के लिए कार्य करता है और प्रदान किए गए स्मार्ट पॉइंटर [SWS_CRYPT_50174] के माध्यम से प्रबंधित किया जाता है। एक उपयुक्त सार्वजनिक कुंजी के असाइनमेंट के बाद, संदेशों को या तो एकल रन में कॉम्पैक्ट रूप से या बहु-भाग स्ट्रीमिंग सत्र [SWS_CRYPT_50090] के माध्यम से निरंतर रूपांतरित किया जा सकता है। सही निष्पादन के लिए बफ़र आकारों की पहले से गणना की जानी चाहिए, जहाँ संदर्भ के सभी ऑपरेशनों को अपवाद-सुरक्षित (exception-safe) और थ्रेड-सुरक्षित (thread-safe) के रूप में निर्दिष्ट किया गया है।

संदर्भ

C++ क्लास ara::crypto::cryp::EncryptorPublicCtx AUTOSAR Adaptive Platform में असममित डेटा एन्क्रिप्शन के लिए मानकीकृत इंटरफ़ेस प्रदान करती है। यह क्लाइंट अनुप्रयोगों को असममित सार्वजनिक कुंजी की सहायता से प्लेनटेक्स्ट डेटा के एन्क्रिप्शन के लिए सेवा प्रदान करती है। इसमें क्रिप्टोग्राफ़िक कुंजी का कॉन्फ़िगरेशन या तो सीधे किसी कुंजी ऑब्जेक्ट ([SWS_CRYPT_50175]) के माध्यम से या किसी कुंजी स्लॉट (KeySlot, [SWS_CRYPT_50086]) के संदर्भ के माध्यम से किया जा सकता है। डेटा स्थानांतरण मेमोरी-कुशल बफ़र क्षेत्रों (प्लेनटेक्स्ट डेटा के लिए ReadOnlyMemRegion और सिफरटेक्स्ट आउटपुट के लिए ReadWriteMemRegion) के माध्यम से होता है।

जीवनचक्र

संदर्भ के इंस्टेंसेस को टाइप एलियास Sptr में परिभाषित शेयर्ड पॉइंटर std::shared_ptr<EncryptorPublicCtx> के माध्यम से प्रबंधित किया जाता है ([SWS_CRYPT_50174])। निर्माण स्वयं इस इंटरफ़ेस परिभाषा का हिस्सा नहीं है; संभवतः इंस्टैंशिएशन क्रिप्टो आर्किटेक्चर के एक उच्च-स्तरीय फ़ैक्टरी घटक के माध्यम से होता है। प्रश्न Q-5b7490ba113bb861 (खुला) ऑब्जेक्ट अपने जीवनकाल के दौरान स्पष्ट रूप से परिभाषित स्थितियों से गुजरता है:

  • आरंभीकृत नहीं: इंस्टैंशिएशन के बाद, संदर्भ के पास अभी तक कोई कुंजी नहीं होती है। इस स्थिति में डेटा प्रोसेसिंग से जुड़े ऑपरेशन अनुमत नहीं हैं।
  • कॉन्फ़िगर किया गया (तैयार): किसी PublicKey ([SWS_CRYPT_50175]) या KeySlot ([SWS_CRYPT_50086]) के साथ SetKey() को कॉल करने से संदर्भ उपयोग के लिए तैयार हो जाता है। इस स्थिति से या तो एकल-चरण एन्क्रिप्शन निष्पादित किया जा सकता है या एक स्ट्रीमिंग सत्र शुरू किया जा सकता है।
  • स्ट्रीमिंग सक्रिय: Start() ([SWS_CRYPT_50087]) का कॉल संदर्भ को स्ट्रीमिंग स्थिति में डाल देता है। निरंतर डेटा ब्लॉक Update() ([SWS_CRYPT_50176]) के माध्यम से संसाधित किए जाते हैं। सत्र या तो Finish() ([SWS_CRYPT_50088]) के साथ समाप्त किया जाता है या Cancel() ([SWS_CRYPT_50089]) के साथ निरस्त किया जाता है, जिससे संदर्भ वापस कॉन्फ़िगर किया गया स्थिति में लौट आता है।

क्लास के सभी मेथड्स अपवाद-सुरक्षित (exception safe) और थ्रेड-सुरक्षित (thread-safe) के रूप में निर्दिष्ट हैं। यदि संदर्भ को तब नष्ट किया जाता है जब कोई स्ट्रीमिंग ऑपरेशन अभी तक समाप्त नहीं हुआ है, तो अंतर्निहित कार्यान्वयन आवंटित बफ़र्स को साफ़ कर सकता है और सत्र को अंतर्निहित रूप से त्याग सकता है। प्रश्न Q-3eadc946a0bdbdfd (खुला)

Lebenszyklus Uninitialized आरंभीकृत नहीं Configured Konfiguriert (Bereit) Uninitialized->Configured SetKey() Configured->Configured SetKey() / Encrypt() Streaming स्ट्रीमिंग सक्रिय Configured->Streaming Start() Streaming->Configured Finish() / Cancel() Streaming->Streaming Update()

स्थिति आरेख: कॉन्फ़िगरेशन से लेकर रूपांतरण तक संदर्भ का जीवनचक्र और स्थिति संक्रमण। स्रोत: [SWS_CRYPT_50086], [SWS_CRYPT_50175], [SWS_CRYPT_50087], [SWS_CRYPT_50176], [SWS_CRYPT_50088], [SWS_CRYPT_50089], [SWS_CRYPT_50090]

उपयोग पथ

क्लास दो प्रोसेसिंग मोड का समर्थन करती है: पूर्ण डेटा सेट के लिए एकल-चरण प्रोसेसिंग और खंडित डेटा स्ट्रीम के लिए बहु-चरणीय स्ट्रीमिंग। एन्क्रिप्शन करने से पहले, अनुप्रयोगों को बफ़र सीमाओं पर विचार करना चाहिए:

  • GetMinimumChunkSize()` (<a class="spec-record-ref" data-req="SWS_CRYPT_50178">[SWS_CRYPT_50178]</a>) und <code>GetMaximumChunkSize() ([SWS_CRYPT_50091]) के माध्यम से एकल कॉल्स के लिए न्यूनतम और अधिकतम समर्थित इनपुट आकार निर्धारित किए जा सकते हैं।
  • आउटपुट बफ़र की आवश्यक क्षमता के बारे में पहले से GetRequiredOutputBufferSize() ([SWS_CRYPT_50177]) के साथ पूछताछ की जानी चाहिए। पैरामीटर isFinal नियंत्रित करता है कि गणना मध्यवर्ती चरणों (false) के लिए की जाती है या अंतिम कॉल्स अथवा एकल चरणों (true) के लिए।

स्ट्रीमिंग एन्क्रिप्शन का विशिष्ट क्रम निम्नलिखित चरणों में विभाजित है:

  1. एक वैध PublicKey ([SWS_CRYPT_50175]) के साथ SetKey() के माध्यम से कुंजी असाइनमेंट।
  2. Start() ([SWS_CRYPT_50087]) को कॉल करके स्ट्रीमिंग सत्र का आरंभीकरण।
  3. GetRequiredOutputBufferSize(inputSize, false) ([SWS_CRYPT_50177]) के साथ मध्यवर्ती ब्लॉकों के लिए आवश्यक आउटपुट बफ़र आकार की गणना।
  4. Update() ([SWS_CRYPT_50176]) के माध्यम से डेटा ब्लॉकों का बार-बार रूपांतरण।
  5. अंतिम ब्लॉक के लिए बफ़र आकार का निर्धारण (isFinal = true) और Finish() ([SWS_CRYPT_50088]) के माध्यम से ऑपरेशन को अंतिम रूप देना।

कॉम्पैक्ट डेटा के लिए, जिसे एक ही बार में संसाधित किया जा सकता है, Encrypt() ([SWS_CRYPT_50090]) स्टार्ट, अपडेट और फ़िनिश चरणों में विभाजित किए बिना एक सीधा एकल-चरण कॉल प्रदान करता है।

असममित स्ट्रीमिंग एन्क्रिप्शन का अनुक्रमएप्लिकेशनEncryptorPublicCtxUse Case: कॉन्फ़िगरेशन और इनिशियलाइज़ेशनSetKey(key)Result<void>Start()Result<void>Use Case: Streaming-VerarbeitungGetRequiredOutputBufferSize(inputSize, false)Result<size_t>Update(in, out)Result<size_t> (साइफ़रटेक्स्ट की लंबाई)Use Case: AbschlussGetRequiredOutputBufferSize(finalInputSize, true)Result<size_t>Finish(finalIn, out)Result<size_t> (अंतिम साइफ़रटेक्स्ट की लंबाई)

अनुक्रम आरेख: बफ़र आकार निर्धारण के साथ बहु-भाग स्ट्रीमिंग एन्क्रिप्शन का विशिष्ट क्रम। स्रोत: [SWS_CRYPT_50175], [SWS_CRYPT_50087], [SWS_CRYPT_50177], [SWS_CRYPT_50176], [SWS_CRYPT_50088]

त्रुटि परिदृश्य

सभी मेथड्स त्रुटि संकेतन के लिए ara::core::Result का उपयोग करते हैं और त्रुटि की स्थिति में रोलबैक सिमेंटिक्स की गारंटी देते हैं:

  • स्थिति त्रुटियाँ: एक गैर-आरंभीकृत संदर्भ पर Start(), Encrypt() या GetRequiredOutputBufferSize() को कॉल करने से ara::crypto::CryptoErrc::kUninitializedContext उत्पन्न होता है ([SWS_CRYPT_50087], [SWS_CRYPT_50090], [SWS_CRYPT_50177])। यदि पहले Start() को निष्पादित किए बिना Update(), Finish() या Cancel() को कॉल किया जाता है, तो ऑपरेशन ara::crypto::CryptoErrc::kProcessingNotStarted के साथ विफल हो जाता है ([SWS_CRYPT_50176], [SWS_CRYPT_50088], [SWS_CRYPT_50089])।
  • कुंजी और उपयोग त्रुटियाँ: यदि प्रदान की गई कुंजी या KeySlot संदर्भ के साथ असंगत है, तो ara::crypto::CryptoErrc::kIncompatibleObject की रिपोर्ट की जाती है ([SWS_CRYPT_50175], [SWS_CRYPT_50086], [SWS_CRYPT_50087], [SWS_CRYPT_50090])। यदि कुंजी के अनुमत उपयोग में kAllowDataEncryption अनुमति शामिल नहीं है, तो इसका परिणाम ara::crypto::CryptoErrc::kUsageViolation में होता है ([SWS_CRYPT_50175], [SWS_CRYPT_50087], [SWS_CRYPT_50090])। यदि कोई संदर्भित KeySlot खाली है, तो ara::crypto::CryptoErrc::kEmptyKeySlot की रिपोर्ट की जाती है ([SWS_CRYPT_50087], [SWS_CRYPT_50090])।
  • बफ़र और डेटा त्रुटियाँ: यदि पास किया गया आउटपुट बफ़र बहुत छोटा है, तो Encrypt(), Update() और Finish() ara::crypto::CryptoErrc::kInsufficientCapacity के साथ प्रतिक्रिया देते हैं ([SWS_CRYPT_50090], [SWS_CRYPT_50176], [SWS_CRYPT_50088])। अनुमत चंक आकारों से विचलन के परिणामस्वरूप ara::crypto::CryptoErrc::kInvalidInputSize होता है, अमान्य इनपुट डेटा के परिणामस्वरूप ara::crypto::CryptoErrc::kInvalidArgument होता है।
  • असमर्थित फ़ंक्शन और संसाधन बाधाएँ: यदि कार्यान्वयन स्ट्रीमिंग या एकल-चरण कॉल का समर्थन नहीं करता है, तो ऑपरेशन ara::crypto::CryptoErrc::kUnsupported के साथ विफल हो जाता है ([SWS_CRYPT_50087], [SWS_CRYPT_50090], [SWS_CRYPT_50176], [SWS_CRYPT_50088])। अवरुद्ध क्रिप्टोग्राफ़िक संसाधनों के मामले में ara::crypto::CryptoErrc::kBusyResource लौटाया जाता है ([SWS_CRYPT_50087], [SWS_CRYPT_50090])।

यह गाइड AUTOSAR Adaptive Platform रिलीज़ R25-11 की आवश्यकताओं पर आधारित है और क्लास ara::crypto::cryp::EncryptorPublicCtx के विनिर्देश को सारांशित करता है।

सदस्य मानचित्र

क्लास आरेख

Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.

G nara__crypto__cryp__EncryptorPublicCtx829 EncryptorPublicCtx + Cancel() + Encrypt() + Finish() + GetMaximumChunkSize() + GetMinimumChunkSize() + GetRequiredOutputBufferSize() + SetKey() + Start() + Update() nara__crypto__cryp__CryptoContext85 CryptoContext nara__crypto__cryp__EncryptorPublicCtx829->nara__crypto__cryp__CryptoContext85

विवरण दृश्य

रूपरेखा में कोई प्रविष्टि चुनें।

मेथड

Cancel फ़ंक्शन

Cancel the ongoing streaming operation that has been initiated by Start() and has not yet been finished.

virtual ara::core::Result< void > Cancel () noexcept=0;
Encrypt फ़ंक्शन

Encrypt data in a single-call.

virtual ara::core::Result< std::size_t > Encrypt (ReadOnlyMemRegion in, ReadWriteMemRegion out) noexcept=0;
Finish फ़ंक्शन

Finalize the encryption.

virtual ara::core::Result< std::size_t > Finish (ReadOnlyMemRegion in, ReadWriteMemRegion out) noexcept=0;
GetMaximumChunkSize फ़ंक्शन

Get the maximum input buffer size supported for processing in single calls to Update(), Finish(), or Encrypt() by this context.

virtual ara::core::Result< std::size_t > GetMaximumChunkSize () const noexcept=0;
GetMinimumChunkSize फ़ंक्शन

Get the minimum input buffer size supported for processing in single calls to Update(), Finish(), or Encrypt() by this context.

virtual ara::core::Result< std::size_t > GetMinimumChunkSize () const noexcept=0;
GetRequiredOutputBufferSize फ़ंक्शन

Calculate the maximum required size of the output buffer depending on the input size in the current state of the context.

virtual ara::core::Result< std::size_t > GetRequiredOutputBufferSize (std::size_t inputSize, bool isFinal) const noexcept;
SetKey फ़ंक्शन 2

Configure the context to use the key stored in the provided KeySlot at the time the encryption is started.

ओवरलोड SetKey 2
virtual ara::core::Result< void > SetKey (KeySlot::Sptr keySlot) noexcept=0; SWS_CRYPT_50086
virtual ara::core::Result< void > SetKey (PublicKey::Sptr key) noexcept=0; SWS_CRYPT_50175
Start फ़ंक्शन

Initialize the context for a new encryption.

virtual ara::core::Result< void > Start () noexcept=0;
Update फ़ंक्शन

Encrypt a data buffer.

virtual ara::core::Result< std::size_t > Update (ReadOnlyMemRegion in, ReadWriteMemRegion out) noexcept=0;

टाइप उपनाम

Sptr टाइप उपनाम

Smart pointer of the interface.

मेथड का प्रलेखन

फ़ंक्शन Cancel [SWS_CRYPT_50089] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< void > Cancel () noexcept=0;

Cancel the ongoing streaming operation that has been initiated by Start() and has not yet been finished.

एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: c2111af75063 उद्गम खुले प्रश्न (1)
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

मेथड Cancel() संदर्भ ara::crypto::cryp::EncryptorPublicCtx में एक सक्रिय स्ट्रीमिंग ऑपरेशन को निरस्त करता है, जिसे पहले Start() के माध्यम से शुरू किया गया था और अभी तक समाप्त नहीं हुआ है [SWS_CRYPT_50089]। यह कोई इनपुट पैरामीटर स्वीकार नहीं करता है और एक ara::core::Result<void> लौटाता है, जो सफलता की स्थिति में रिक्त होता है [SWS_CRYPT_50089]। चूँकि सिग्नेचर सीधे एक Result प्रदान करता है और Future नहीं, इसलिए निरस्तीकरण संभवतः सिंक्रोनस रूप से निष्पादित होता है। प्रश्न Q-cd18e56d693fe1a4 (खुला)

त्रुटि हैंडलिंग और समवर्तीता

यदि डेटा प्रोसेसिंग पहले Start() द्वारा शुरू नहीं की गई थी, तो ऑपरेशन रोलबैक सिमेंटिक्स का पालन करते हुए त्रुटि कोड ara::crypto::CryptoErrc::kProcessingNotStarted के साथ विफल हो जाता है [SWS_CRYPT_50089]। विनिर्देश के अनुसार, इंटरफ़ेस noexcept के साथ घोषित है, अपवाद-सुरक्षित (exception safe) है और समवर्ती पहुंच के लिए थ्रेड-सुरक्षित (thread-safe) के रूप में वर्गीकृत है [SWS_CRYPT_50089]।

क्रिप्टो-स्टैक में अंतःक्रिया

Cancel() द्वारा कार्यान्वित निरस्तीकरण व्यवहार क्रिप्टो मॉड्यूल में स्टेटफुल स्ट्रीमिंग ऑपरेशनों के लिए एक समान डिज़ाइन पैटर्न का पालन करता है। समान त्रुटि सिमेंटिक्स वाले समतुल्य इंटरफेस इनके लिए मौजूद हैं:

  • SignerPrivateCtx [SWS_CRYPT_50041] और VerifierPublicCtx [SWS_CRYPT_50023] में हस्ताक्षर और सत्यापन ऑपरेशन,
  • SymmetricCipherCtx [SWS_CRYPT_50046] तथा AuthCipherCtx [SWS_CRYPT_50077] में सममित और प्रमाणित एन्क्रिप्शन,
  • DecryptorPrivateCtx [SWS_CRYPT_50069] में असममित डिक्रिप्शन,
  • MessageAuthnCodeCtx [SWS_CRYPT_50027] में संदेश प्रमाणीकरण कोड (message authentication codes) तथा HashFunctionCtx [SWS_CRYPT_50058] में हैश गणनाएँ।

यह पाठ एक AI द्वारा तैयार किया गया था और AUTOSAR Adaptive R25-11 पर आधारित है।

इम्प्लीमेंटर गाइड जल्द आएगी (जटिलता I1)

Header-Datei#include "ara/crypto/cryp/encryptor_public_ctx.h"
Scopeclass ara::crypto::cryp::EncryptorPublicCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
ara::core::Result< void >an empty result if the ongoing streaming operation was cancelled successfully, or a result containing an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotStartedrollback_semantics if data processing was not started by a call of the Start() method

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50089
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50089@rel:R25-11#775919f5
Content hash
775919f5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50089
Status: valid/unmigrated Version: rel:R25-11#e205d10b Versionshistorie & Revisions (1 transition)
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_50089@rel:R25-11#e205d10b
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

फ़ंक्शन Encrypt [SWS_CRYPT_50090] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > Encrypt (ReadOnlyMemRegion in, ReadWriteMemRegion out) noexcept=0;

Encrypt data in a single-call.

एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: 523fe4336ba2 उद्गम
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

सिंक्रोनस विधि Encrypt एक ही कॉल में प्लेनटेक्स्ट डेटा के एन्क्रिप्शन का कार्य करती है ([SWS_CRYPT_50090])। यह बफर in (ReadOnlyMemRegion) से इनपुट डेटा लेती है और सिफर को आउटपुट बफर out (ReadWriteMemRegion) में लिखती है ([SWS_CRYPT_50090])। रिटर्न मान ara::core::Result<std::size_t> सफलता के मामले में वास्तव में लिखे गए आउटपुट डेटा का आकार देता है, जो out की कुल क्षमता से कम हो सकता है ([SWS_CRYPT_50090])।

समवर्तीता के संबंध में, फ़ंक्शन को थ्रेड-सुरक्षित (thread-safe) और साथ ही अपवाद-सुरक्षित (exception safe) के रूप में निर्दिष्ट किया गया है ([SWS_CRYPT_50090])।

संदर्भ EncryptorPublicCtx के साथ इंटरेक्शन में, कॉल करने से पहले निम्नलिखित बफर सीमाओं का ध्यान रखा जाना चाहिए:

  • इनपुट आकार [SWS_CRYPT_50178] (GetMinimumChunkSize) और [SWS_CRYPT_50091] (GetMaximumChunkSize) द्वारा निर्दिष्ट सीमाओं के भीतर होना चाहिए।
  • आउटपुट बफर out की अधिकतम आवश्यक क्षमता की गणना पैरामीटर isFinal = true के साथ GetRequiredOutputBufferSize के माध्यम से पहले से की जा सकती है ([SWS_CRYPT_50177])।

सभी त्रुटि मामलों में रोलबैक सिमेंटिक्स होता है ([SWS_CRYPT_50090])। ara::crypto::CryptoErrc से परिभाषित त्रुटियों में शामिल हैं:

  • kUninitializedContext: एक कुंजी प्रदान करके संदर्भ को प्रारंभ नहीं किया गया था ([SWS_CRYPT_50090])।
  • kEmptyKeySlot: एक कॉन्फ़िगर किया गया KeySlot खाली है ([SWS_CRYPT_50090])।
  • kIncompatibleObject: कुंजी का प्रकार ट्रांसफ़ॉर्मेशन से मेल नहीं खाता है ([SWS_CRYPT_50090])।
  • kUsageViolation: कुंजी उपयोग डेटा एन्क्रिप्शन की अनुमति नहीं देता है (kAllowDataEncryption) ([SWS_CRYPT_50090])।
  • kInsufficientCapacity: बफर out बहुत छोटा है ([SWS_CRYPT_50090])।
  • kInvalidInputSize या kInvalidArgument: इनपुट आकार संसाधित करने योग्य नहीं है या इनपुट डेटा अमान्य है ([SWS_CRYPT_50090])।
  • kUnsupported: सिंगल-कॉल एन्क्रिप्शन समर्थित नहीं है ([SWS_CRYPT_50090])।
  • kBusyResource: एक आवश्यक संसाधन व्यस्त है ([SWS_CRYPT_50090])।

यह उपयोग नोट AUTOSAR विनिर्देश के आधार पर एक AI द्वारा जनरेट किया गया था।

इम्प्लीमेंटर गाइड जल्द आएगी (जटिलता I1)

Header-Datei#include "ara/crypto/cryp/encryptor_public_ctx.h"
Scopeclass ara::crypto::cryp::EncryptorPublicCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
inan input data buffer containing the plaintext

Parameter (out)

ParameterBeschreibung
outan output data buffer that the encrypted data is written to

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >a result containing the size of the output data or an error. The output data may be smaller than the size of the output buffer out.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if single-call encryption is not supported
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the input buffer cannot be processed
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if the provided input data contains invalid data
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics a required resource is busy
ara::crypto::CryptoErrc::kEmptyKeySlotrollback_semantics if a KeySlot was configured that is currently is empty
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the key does not include kAllowData Encryption
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if type of the key is incompatible to the transformation

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50090
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50090@rel:R25-11#315f9c57
Content hash
315f9c57
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50090
Status: valid/unmigrated Version: rel:R25-11#6de65ef2 Versionshistorie & Revisions (1 transition)
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_50090@rel:R25-11#6de65ef2
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

फ़ंक्शन Finish [SWS_CRYPT_50088] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > Finish (ReadOnlyMemRegion in, ReadWriteMemRegion out) noexcept=0;

Finalize the encryption.

एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: ef643cd9b744 उद्गम
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

उपयोग

विधि Finish ara::crypto::cryp::EncryptorPublicCtx के संदर्भ में असममित एन्क्रिप्शन प्रक्रिया को पूरा करती है [SWS_CRYPT_50088]। कॉल सिंक्रोनस रूप से होती है और इसे noexcept, exception-safe और साथ ही thread-safe के रूप में निर्दिष्ट किया गया है। पैरामीटर के रूप में, फ़ंक्शन in (ReadOnlyMemRegion) के माध्यम से अंतिम प्लेनटेक्स्ट अंश लेता है और परिणामी सिफर डेटा को आउटपुट बफर out (ReadWriteMemRegion) में लिखता है। out के लिए आवश्यक बफर आकार GetRequiredOutputBufferSize() के माध्यम से पहले से निर्धारित किया जा सकता है। रिटर्न मान ara::core::Result<std::size_t> सफलता के मामले में वास्तव में लिखे गए बाइट्स की संख्या देता है, जो आउटपुट बफर की कुल क्षमता से कम हो सकती है [SWS_CRYPT_50088]।

त्रुटि हैंडलिंग और समवर्तीता

सभी त्रुटि मामलों में रोलबैक सिमेंटिक्स होता है, जिससे कि विफलता की स्थिति में संदर्भ की स्थिति सुसंगत बनी रहे [SWS_CRYPT_50088]। विधि ara::crypto::CryptoErrc से निम्नलिखित विशिष्ट त्रुटि कोड रिपोर्ट करती है:

  • kProcessingNotStarted: डेटा प्रोसेसिंग पहले Start() को कॉल करके शुरू नहीं की गई थी।
  • kInsufficientCapacity: प्रदान किया गया आउटपुट बफर out बहुत छोटा है।
  • kInvalidInputSize: in का बफर आकार संदर्भ द्वारा संसाधित नहीं किया जा सकता है।
  • kInvalidArgument: पास किए गए इनपुट डेटा में अमान्य मान शामिल हैं।
  • kUnsupported: स्ट्रीम प्रोसेसिंग विशिष्ट संदर्भ द्वारा समर्थित नहीं है।

इंटरैक्शन

अंतिम रूप देना (फ़ाइनलाइज़ेशन) क्रिप्टोग्राफ़िक प्रोसेसिंग वर्कफ़्लो को समाप्त करता है [SWS_CRYPT_50088]। डिक्रिप्शन के लिए पूरक समकक्ष के रूप में DecryptorPrivateCtx::Finish [SWS_CRYPT_50068] कार्य करता है, जबकि सममित एन्क्रिप्शन के क्षेत्र में SymmetricCipherCtx::Finish [SWS_CRYPT_50045] एक तुलनीय वर्कफ़्लो पैटर्न प्रदान करता है।

यह पाठ विनिर्देश के आधार पर एक AI प्रक्रिया द्वारा तैयार किया गया था।

Header-Datei#include "ara/crypto/cryp/encryptor_public_ctx.h"
Scopeclass ara::crypto::cryp::EncryptorPublicCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
inan input data buffer containing a part of the plaintext

Parameter (out)

ParameterBeschreibung
outan output data buffer that contains encrypted data. The required size of this buffer can be queried using GetRequiredOutputBuffer Size()

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >a result containing the size of the output data or an error. The output data may be smaller than the size of the output buffer out.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotStartedrollback_semantics if data processing was not started by a call of the Start() method
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the input buffer cannot be processed
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if the provided input data contains invalid data
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if stream processing is not supported by the context

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50088
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50088@rel:R25-11#c3e300cb
Content hash
c3e300cb
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50088
Status: valid/unmigrated Version: rel:R25-11#3b39f5a6 Versionshistorie & Revisions (1 transition)
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_50088@rel:R25-11#3b39f5a6
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

फ़ंक्शन GetMaximumChunkSize [SWS_CRYPT_50091] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< std::size_t > GetMaximumChunkSize () const noexcept=0;

Get the maximum input buffer size supported for processing in single calls to Update(), Finish(), or Encrypt() by this context.

Header-Datei#include "ara/crypto/cryp/encryptor_public_ctx.h"
Scopeclass ara::crypto::cryp::EncryptorPublicCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >the maximum buffer size in bytes

Fehler

FehlercodeBeschreibung
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_50091
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50091@rel:R25-11#a1339ec7
Content hash
a1339ec7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50091
Status: valid/unmigrated Version: rel:R25-11#45b93821 Versionshistorie & Revisions (1 transition)
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_50091@rel:R25-11#45b93821
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

फ़ंक्शन GetMinimumChunkSize [SWS_CRYPT_50178] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< std::size_t > GetMinimumChunkSize () const noexcept=0;

Get the minimum input buffer size supported for processing in single calls to Update(), Finish(), or Encrypt() by this context.

Header-Datei#include "ara/crypto/cryp/encryptor_public_ctx.h"
Scopeclass ara::crypto::cryp::EncryptorPublicCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >the minimum buffer size in bytes

Fehler

FehlercodeBeschreibung
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_50178
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50178@rel:R25-11#4f7c77ea
Content hash
4f7c77ea
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50178
Status: valid/unmigrated Version: rel:R25-11#96524bdd Versionshistorie & Revisions (1 transition)
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_50178@rel:R25-11#96524bdd
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

फ़ंक्शन GetRequiredOutputBufferSize [SWS_CRYPT_50177] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > GetRequiredOutputBufferSize (std::size_t inputSize, bool isFinal) const noexcept;

Calculate the maximum required size of the output buffer depending on the input size in the current state of the context.

Header-Datei#include "ara/crypto/cryp/encryptor_public_ctx.h"
Scopeclass ara::crypto::cryp::EncryptorPublicCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
inputSizesize of input data
isFinalif true, calculate maximum required output buffer size for Finish() or Encrypt(), otherwise for Update()

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >a result containing the required capacity of the output buffer (in bytes) or an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUninitializedContextrollback_semantics if the context was not initialized by deploying a key and setting the transformation direction

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50177
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50177@rel:R25-11#21b121a1
Content hash
21b121a1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50177
Status: valid/unmigrated Version: rel:R25-11#7b76dbd4 Versionshistorie & Revisions (1 transition)
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_50177@rel:R25-11#7b76dbd4
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

फ़ंक्शन SetKey [SWS_CRYPT_50086] Upstream: RS_CRYPTO_02001, RS_CRYPTO_02003

virtual ara::core::Result< void > SetKey (KeySlot::Sptr keySlot) noexcept=0;

Configure the context to use the key stored in the provided KeySlot at the time the encryption is started.

एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: e68fdee554ba उद्गम खुले प्रश्न (1)
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

उपयोग और कॉल संदर्भ

इंटरफ़ेस ara::crypto::cryp::EncryptorPublicCtx (हेडर फ़ाइल ara/crypto/cryp/encryptor_public_ctx.h) की शुद्ध आभासी विधि SetKey असममित एन्क्रिप्शन ऑपरेशनों के लिए एक कुंजी निर्दिष्ट करने का कार्य करती है [SWS_CRYPT_50086]। पैरामीटर के रूप में KeySlot::Sptr प्रकार का एक स्मार्ट-पॉइंटर keySlot पास किया जाता है, जिसमें एक PublicKey होना आवश्यक है [SWS_CRYPT_50086]। कॉल सिंक्रोनस रूप से होती है और एक खाली ara::core::Result<void> के माध्यम से सफलता का संकेत देती है। सिमेंटिक्स के लिए यह आवश्यक है कि स्लॉट में संग्रहीत कुंजी का उपयोग केवल उसी समय किया जाए जब एन्क्रिप्शन शुरू किया जाता है [SWS_CRYPT_50086]। (व्याख्या: चूंकि कुंजी का रिज़ॉल्यूशन वास्तविक एन्क्रिप्शन प्रारंभ होने के साथ ही होता है, इसलिए इस प्रारंभ समय से पहले स्लॉट सामग्री के अपडेट अभी भी प्रभावी होने चाहिए।) प्रश्न Q-25c5d462aafde8a1 (खुला)

त्रुटि प्रबंधन

यदि कॉन्फ़िगरेशन विफल हो जाती है, तो परिणाम ऑब्जेक्ट में रोलबैक सिमेंटिक्स के साथ एक त्रुटि कोड वापस लौटाया जाता है [SWS_CRYPT_50086]:

  • ara::crypto::CryptoErrc::kIncompatibleObject: रिपोर्ट किया जाता है जब प्रदान किया गया keySlot इस संदर्भ के साथ असंगत होता है [SWS_CRYPT_50086]।
  • ara::crypto::CryptoErrc::kUnsupported: तब होता है जब विशिष्ट संदर्भ कार्यान्वयन विशेष रूप से PublicKey की सीधी सेटिंग का समर्थन करता है और KeySlot के माध्यम से कुंजी बाइंडिंग की अनुमति नहीं देता है [SWS_CRYPT_50086]।

समवर्तीता और परस्पर क्रिया

ऑपरेशन को noexcept के रूप में घोषित किया गया है, अपवाद-सुरक्षित (exception safe) और समवर्ती उपयोग के लिए थ्रेड-सुरक्षित (thread-safe) के रूप में निर्दिष्ट किया गया है [SWS_CRYPT_50086]।

KeySlot के माध्यम से अप्रत्यक्ष कुंजी संदर्भ की अवधारणा अन्य असममित संदर्भों में भी समान रूप से पाई जाती है, जैसे कि VerifierPublicCtx::SetKey [SWS_CRYPT_50018] और KeyEncapsulatorPublicCtx::SetKey [SWS_CRYPT_50012]। यह उन विधियों से भिन्न है जो कुंजी ऑब्जेक्ट्स को सीधे स्वीकार करती हैं, जैसे उदाहरण के लिए [SWS_CRYPT_24115] या [SWS_CRYPT_21815] में।

यह उपयोग नोट AUTOSAR विनिर्देश के आधार पर एक AI द्वारा जनरेट किया गया था।

इम्प्लीमेंटर गाइड जल्द आएगी (जटिलता I2)

Header-Datei#include "ara/crypto/cryp/encryptor_public_ctx.h"
Scopeclass ara::crypto::cryp::EncryptorPublicCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
keySlota keyslot containing a PublicKey.

Rückgabewert

TypBeschreibung
ara::core::Result< void >An empty result or an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if the provided keyslot is incompatible with this context
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context only supports setting a PublicKey

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50086
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50086@rel:R25-11#5f5aeb39
Content hash
5f5aeb39
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50086
Status: valid/unmigrated Version: rel:R25-11#bd5ede4d Versionshistorie & Revisions (1 transition)
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_50086@rel:R25-11#bd5ede4d
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

फ़ंक्शन SetKey [SWS_CRYPT_50175] Upstream: RS_CRYPTO_02001, RS_CRYPTO_02003

virtual ara::core::Result< void > SetKey (PublicKey::Sptr key) noexcept=0;

Configure the context to use the provided key.

एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: 09de2ed1c4fc उद्गम खुले प्रश्न (1)
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

उपयोग

क्लास ara::crypto::cryp::EncryptorPublicCtx की वर्चुअल विधि SetKey प्रदान की गई सार्वजनिक कुंजी [SWS_CRYPT_50175] के उपयोग के लिए संदर्भ को कॉन्फ़िगर करती है।\nपैरामीटर key (प्रकार PublicKey::Sptr का) के माध्यम से एन्क्रिप्शन के लिए उपयोग की जाने वाली कुंजी ऑब्जेक्ट को पास किया जाता है [SWS_CRYPT_50175]।\nनिष्पादन सिंक्रोनस रूप से होता है और एक ara::core::Result<void> लौटाता है, जिसमें सफलता की स्थिति में कोई मान नहीं होता है [SWS_CRYPT_50175]।

त्रुटि प्रबंधन

यदि कॉन्फ़िगरेशन के दौरान कोई त्रुटि होती है, तो परिभाषित रोलबैक सिमेंटिक्स के साथ एक संगत त्रुटि कोड रिपोर्ट किया जाता है [SWS_CRYPT_50175]:

  • ara::crypto::CryptoErrc::kUsageViolation: कुंजी का अनुमत उपयोग डेटा एन्क्रिप्शन (kAllowDataEncryption) की अनुमति नहीं देता है [SWS_CRYPT_50175]।
  • ara::crypto::CryptoErrc::kIncompatibleObject: पास किया गया कुंजी ऑब्जेक्ट इस एन्क्रिप्शन संदर्भ के साथ असंगत है [SWS_CRYPT_50175]।
  • ara::crypto::CryptoErrc::kUnsupported: ठोस संदर्भ कार्यान्वयन केवल एक KeySlot [SWS_CRYPT_50175] के माध्यम से बाइंडिंग का समर्थन करता है।

समवर्तीता और प्रतिबंध

इंटरफ़ेस को noexcept के रूप में परिभाषित किया गया है और यह ऐसे व्यवहार को निर्दिष्ट करता है जो thread-safe और exception safe दोनों है [SWS_CRYPT_50175]।\nरोलबैक सिमेंटिक्स के कारण, त्रुटि की स्थिति में संदर्भ अपनी पिछली स्थिति में बना रहता है।\nव्याख्या: एक सफल कॉल संभवतः बाद के एन्क्रिप्शन ऑपरेशनों के लिए एक अनिवार्य पूर्वशर्त है, क्योंकि असाइन की गई कुंजी के बिना संदर्भ कोई ऑपरेशन नहीं कर सकता है। प्रश्न Q-ab4779cac18793fa (खुला)

इंटरैक्शन

यह प्रक्रिया असममित संदर्भों के मॉड्यूल-व्यापी पैटर्न का अनुसरण करती है, जैसा कि कुंजी बाइंडिंग के लिए VerifierPublicCtx::SetKey [SWS_CRYPT_24115] और KeyEncapsulatorPublicCtx::SetKey [SWS_CRYPT_21815] में भी उपयोग किया जाता है।\nवैकल्पिक रूप से, संबंधित इंटरफ़ेस कॉन्फ़िगरेशन के लिए KeySlot-वेरिएंट भी प्रदान करते हैं, जैसे कि VerifierPublicCtx [SWS_CRYPT_50018] या KeyEncapsulatorPublicCtx [SWS_CRYPT_50012] में।

यह पाठ AUTOSAR R25-11 विनिर्देश के आधार पर एक AI प्रणाली द्वारा जनरेट किया गया था।

इम्प्लीमेंटर गाइड जल्द आएगी (जटिलता I2)

Header-Datei#include "ara/crypto/cryp/encryptor_public_ctx.h"
Scopeclass ara::crypto::cryp::EncryptorPublicCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
keythe PublicKey to be used for encryption

Rückgabewert

TypBeschreibung
ara::core::Result< void >An empty result or an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if the context only supports setting a KeySlot
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if the provided key object is incompatible with this context
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the key does not include kAllowData Encryption

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50175
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50175@rel:R25-11#a2b7a5eb
Content hash
a2b7a5eb
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50175
Status: valid/unmigrated Version: rel:R25-11#52d22e05 Versionshistorie & Revisions (1 transition)
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_50175@rel:R25-11#52d22e05
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

फ़ंक्शन Start [SWS_CRYPT_50087] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< void > Start () noexcept=0;

Initialize the context for a new encryption.

एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: 50b972147b28 उद्गम खुले प्रश्न (1)
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

उपयोग और सिमेंटिक्स

वर्ग ara::crypto::cryp::EncryptorPublicCtx की शुद्ध आभासी विधि Start एक नए एन्क्रिप्शन के लिए संदर्भ को प्रारंभ करने का कार्य करती है [SWS_CRYPT_50087]। यह कोई इनपुट पैरामीटर स्वीकार नहीं करती है और सिंक्रोनस रूप से निष्पादित होती है। रिटर्न मान के रूप में, फ़ंक्शन एक ara::core::Result<void> प्रदान करता है, जो या तो सफल आरंभीकरण की पुष्टि करता है या उत्पन्न हुए त्रुटि कोड को स्थानांतरित करता है [SWS_CRYPT_50087]।

त्रुटि प्रबंधन और रोलबैक व्यवहार

यदि एन्क्रिप्शन प्रक्रिया के लिए आवश्यक पूर्वापेक्षाएँ पूरी नहीं होती हैं, तो कॉल विफल हो जाती है। विनिर्देश त्रुटि मामलों के लिए रोलबैक सिमेंटिक्स का आश्वासन देता है और निम्नलिखित त्रुटि कारणों को परिभाषित करता है [SWS_CRYPT_50087]:

  • UninitializedContext: संदर्भ को पहले से कोई कुंजी निर्दिष्ट नहीं की गई है।
  • ara::crypto::CryptoErrc::kEmptyKeySlot: कॉन्फ़िगर किया गया KeySlot वर्तमान में खाली है।
  • ara::crypto::CryptoErrc::kUsageViolation: कुंजी की अनुमतियों में उपयोग फ़्लैग kAllowDataEncryption शामिल नहीं है।
  • ara::crypto::CryptoErrc::kIncompatibleObject: निर्दिष्ट कुंजी प्रकार आवश्यक ट्रांसफ़ॉर्मेशन के साथ असंगत है।
  • ara::crypto::CryptoErrc::kBusyResource: आरंभीकरण के लिए आवश्यक एक संसाधन व्यस्त है।
  • ara::crypto::CryptoErrc::kUnsupported: स्ट्रीम प्रोसेसिंग विशिष्ट संदर्भ द्वारा समर्थित नहीं है।

समवर्तीता और परस्पर क्रिया

विधि को thread-safe और exception safe के रूप में निर्दिष्ट किया गया है [SWS_CRYPT_50087]। संदर्भ में एक उपयुक्त कुंजी का प्रावधान सफलता के लिए एक अनिवार्य पूर्वापेक्षा है। वैचारिक रूप से, यह फ़ंक्शन क्रिप्टोग्राफ़िक संदर्भों के मानकीकृत जीवनचक्रों में फिट बैठता है, जिसमें ऑपरेशनों को पैरामीटर रहित कॉल के माध्यम से तैयार किया जाता है - हस्ताक्षर सत्यापन [SWS_CRYPT_50019], हस्ताक्षर निर्माण [SWS_CRYPT_50037] या MAC गणना [SWS_CRYPT_22111] के समान। यह कॉल स्ट्रीम एन्क्रिप्शन के वास्तविक निष्पादन से पहले अनिवार्य प्रारंभिक बिंदु का प्रतिनिधित्व करती है। प्रश्न Q-db262c3914e6b4cf (खुला)

यह उपयोग नोट AUTOSAR विनिर्देश R25-11 के आधार पर स्वचालित रूप से उत्पन्न किया गया था।

इम्प्लीमेंटर गाइड जल्द आएगी (जटिलता I1)

Header-Datei#include "ara/crypto/cryp/encryptor_public_ctx.h"
Scopeclass ara::crypto::cryp::EncryptorPublicCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe ara::crypto::CryptoErrc::k rollback_semantics

Rückgabewert

TypBeschreibung
ara::core::Result< void >An empty result or an error

Fehler

FehlercodeBeschreibung
UninitializedContextif the context was not initialized by deploying a key
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics a required resource is busy
ara::crypto::CryptoErrc::kEmptyKeySlotrollback_semantics if a KeySlot was configured that is currently is empty
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the key does not include kAllowData Encryption
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if type of the key is incompatible to the transformation
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if stream processing is not supported by the context

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50087
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50087@rel:R25-11#e9a1ee04
Content hash
e9a1ee04
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50087
Status: valid/unmigrated Version: rel:R25-11#d8c9987f Versionshistorie & Revisions (1 transition)
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_50087@rel:R25-11#d8c9987f
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

फ़ंक्शन Update [SWS_CRYPT_50176] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< std::size_t > Update (ReadOnlyMemRegion in, ReadWriteMemRegion out) noexcept=0;

Encrypt a data buffer.

एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: 01cf25c1d489 उद्गम खुले प्रश्न (1)
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

उपयोग

क्लास ara::crypto::cryp::EncryptorPublicCtx की सिंक्रोनस विधि Update प्लेनटेक्स्ट के डेटा ब्लॉकों के चरण-दर-चरण एन्क्रिप्शन के लिए कार्य करती है [SWS_CRYPT_50176]। पैरामीटर in (ReadOnlyMemRegion) के माध्यम से प्लेनटेक्स्ट का एक भाग पास किया जाता है, जबकि एन्क्रिप्टेड डेटा आउटपुट बफ़र out (ReadWriteMemRegion) में लिखा जाता है [SWS_CRYPT_50176]। रिटर्न मान के रूप में, फ़ंक्शन ara::core::Result<std::size_t> के माध्यम से लिखे गए बाइट्स की वास्तविक संख्या लौटाता है, जो out की प्रदान की गई क्षमता से कम हो सकती है [SWS_CRYPT_50176]।

प्रक्रिया और इंटरैक्शन

Update के पहले कॉल से पहले, डेटा प्रोसेसिंग को अनिवार्य रूप से Start() द्वारा शुरू किया जाना चाहिए [SWS_CRYPT_50176]। व्यक्तिगत कॉलों के लिए अधिकतम अनुमत इनपुट आकार को विधि GetMaximumChunkSize() के माध्यम से क्वेरी किया जा सकता है [SWS_CRYPT_50091]। इसके अतिरिक्त, out के लिए आवश्यक न्यूनतम आकार की गणना GetRequiredOutputBufferSize() के माध्यम से की जा सकती है [SWS_CRYPT_50176]।

त्रुटि हैंडलिंग और समवर्तीता

यदि निष्पादन के दौरान कोई त्रुटि होती है, तो इसे रोलबैक सिमेंटिक्स के साथ रिपोर्ट किया जाता है [SWS_CRYPT_50176]:

  • ara::crypto::CryptoErrc::kProcessingNotStarted: डेटा प्रोसेसिंग पहले Start() के साथ शुरू नहीं की गई थी [SWS_CRYPT_50176]।
  • ara::crypto::CryptoErrc::kInsufficientCapacity: परिणाम के लिए बफ़र out की क्षमता पर्याप्त नहीं है [SWS_CRYPT_50176]।
  • ara::crypto::CryptoErrc::kInvalidInputSize: in का बफ़र आकार अमान्य है [SWS_CRYPT_50176]।
  • ara::crypto::CryptoErrc::kUnsupported: स्ट्रीम प्रोसेसिंग वर्तमान संदर्भ द्वारा समर्थित नहीं है [SWS_CRYPT_50176]।

विधि को अपवाद-सुरक्षित और थ्रेड-सुरक्षित घोषित किया गया है [SWS_CRYPT_50176]। फिर भी, एन्क्रिप्टेड डेटा अंशों का नियतात्मक (deterministic) क्रम सुनिश्चित करने के लिए संभवतः एक ही संदर्भ ऑब्जेक्ट पर कई ऑपरेशनों के समानांतर कॉल के लिए बाहरी सिंक्रोनाइज़ेशन की आवश्यकता होगी। प्रश्न Q-b22ffe505b583b25 (खुला)

यह पाठ एक AI द्वारा तैयार किया गया था और मार्गदर्शन के रूप में कार्य करता है। विनिर्देश ही बाध्यकारी है।

Header-Datei#include "ara/crypto/cryp/encryptor_public_ctx.h"
Scopeclass ara::crypto::cryp::EncryptorPublicCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
inan input data buffer containing a part of the plaintext

Parameter (out)

ParameterBeschreibung
outan output data buffer that the encrypted data will be written into. The required size of this buffer can be queried using GetRequired OutputBufferSize()

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >a result containing the size of the output data or an error. The output data may be smaller than the size of the output buffer out.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotStartedrollback_semantics if data processing was not started by a call of the Start() method
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of the input buffer is invalid
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if stream processing is not supported by the context

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50176
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50176@rel:R25-11#1c031e65
Content hash
1c031e65
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50176
Status: valid/unmigrated Version: rel:R25-11#89552c35 Versionshistorie & Revisions (1 transition)
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_50176@rel:R25-11#89552c35
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

टाइप उपनामों का प्रलेखन

टाइप उपनाम Sptr [SWS_CRYPT_50174] Upstream: RS_CRYPTO_02201

using Sptr = std::shared_ptr<EncryptorPublicCtx>;

Smart pointer of the interface.

Header-Datei#include "ara/crypto/cryp/encryptor_public_ctx.h"
Scopeclass ara::crypto::cryp::EncryptorPublicCtx
SymbolSptr

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50174
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50174@rel:R25-11#ac3445ae
Content hash
ac3445ae
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50174
Status: valid/unmigrated Version: rel:R25-11#e0ee55ea Versionshistorie & Revisions (1 transition)
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_50174@rel:R25-11#e0ee55ea
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill