फ़ंक्शन CalculateHashDigest [SWS_CRYPT_50060] Upstream: RS_CRYPTO_02205
virtual ara::core::Result< std::size_t > CalculateHashDigest (ReadOnly MemRegion data, ReadWriteMemRegion digest, ara::core::Optional< Read OnlyMemRegion > iv) const noexcept=0;
Calculate the hash digest and write the the calculated digest into the provided output buffer.
विधि CalculateHashDigest क्रिप्टोग्राफ़िक हैश मान की एक समकालिक वन-शॉट गणना करती है और परिणाम को प्रदान किए गए आउटपुट बफ़र [SWS_CRYPT_50060] में लिखती है। संसाधित किए जाने वाले इनपुट संदेश data, गंतव्य बफ़र digest, और वैकल्पिक रूप से एक इनिशियलाइज़ेशन वेक्टर iv को पैरामीटर के रूप में पास किया जाता है। सफल निष्पादन पर, फ़ंक्शन परिणाम ऑब्जेक्ट ara::core::Result<std::size_t> के माध्यम से लिखे गए डाइजेस्ट बाइट्स की वास्तविक संख्या लौटाता है [SWS_CRYPT_50060]।
त्रुटि प्रबंधन
यदि गणना विफल हो जाती है, तो इंटरफ़ेस रोलबैक सेमांटिक्स [SWS_CRYPT_50060] की गारंटी देता है। परिणाम में निम्नलिखित त्रुटि कोड शामिल हो सकते हैं:
ara::crypto::CryptoErrc::kInvalidInputSize: पास किए गए डेटा या इनिशियलाइज़ेशन वेक्टर का आकार समर्थित नहीं है [SWS_CRYPT_50060]।ara::crypto::CryptoErrc::kUnsupported: संदर्भ द्वारा सिंगल-कॉल गणना समर्थित नहीं है, या इनिशियलाइज़ेशन वेक्टर का पास किया जाना संदर्भ के कॉन्फ़िगरेशन से मेल नहीं खाता है (IV आवश्यक है, लेकिन गायब है, या IV पास किया गया है, हालांकि समर्थित नहीं है) [SWS_CRYPT_50060]।ara::crypto::CryptoErrc::kInsufficientCapacity: आउटपुट बफ़रdigestकी क्षमता परिकलित डाइजेस्ट के लिए पर्याप्त नहीं है [SWS_CRYPT_50060]।
समवर्तीता और परस्पर क्रिया
फ़ंक्शन को अपवाद-सुरक्षित (exception safe) और थ्रेड-सुरक्षित (thread-safe) घोषित किया गया है [SWS_CRYPT_50060]। अमान्य इनपुट लंबाई से संबंधित त्रुटियों से पहले से बचने के लिए, एकल कॉल के लिए संदर्भ के अधिकतम अनुमत बफ़र आकार को GetMaximumChunkSize के माध्यम से निर्धारित किया जा सकता है [SWS_CRYPT_50062]।
यह उपयोग नोट AUTOSAR विनिर्देश R25-11 के आधार पर स्वचालित रूप से उत्पन्न किया गया था।
इम्प्लीमेंटर गाइड जल्द आएगी (जटिलता I1)
| Header-Datei | #include "ara/crypto/cryp/hash_function_ctx.h" |
|---|---|
| Scope | class ara::crypto::cryp::HashFunctionCtx |
| Exception-Sicherheit | exception safe |
| Thread-Sicherheit | thread-safe |
Parameter (in)
| Parameter | Beschreibung |
|---|---|
| data | the input message that should be processed |
| iv | an optional initialization vector |
Parameter (out)
| Parameter | Beschreibung |
|---|---|
| digest | an output data buffer that the digest will be written into. |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| ara::core::Result<std::size_t > | A result containing the size in bytes of the digest or an error. |
Fehler
| Fehlercode | Beschreibung |
|---|---|
| ara::crypto::CryptoErrc::kInvalidInputSize | rollback_semantics if the size of provided data or IV is not supported |
| ara::crypto::CryptoErrc::kUnsupported | rollback_semantics if single-call operation is not supported, or if the context requires setting an IV but no IV is provided, or if the context does not support setting an IV but an IV is provided |
| ara::crypto::CryptoErrc::kInsufficientCapacity | rollback_semantics if the output buffer is too small |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_CRYPT_50060- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_CRYPT_50060@rel:R25-11#2856892b- Content hash
2856892b- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50060
Status: valid/unmigrated
Version: rel:R25-11#29fd4c6d
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_50060@rel:R25-11#29fd4c6d
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 · जर्मन मूल