function ExportPublicly [SWS_CRYPT_10711] Upstream: RS_CRYPTO_02112
virtual ara::core::Result< std::size_t > ExportPublicly (ReadWriteMem Region out, FormatId format) const noexcept=0;
Serialize object using the provided format.
use
The synchronous member function ExportPublicly of interface ara::crypto::Serializable serializes the object in the specified output format [SWS_CRYPT_10711]. Passed as parameters are the format identifier format (type FormatId) and the target memory area out (type ReadWriteMem Region). Upon successful execution, the function returns the actual number of bytes written in a ara::core::Result<std::size_t> [SWS_CRYPT_10711].
Interaction with related functions
The function is directly related to GetExportSize [SWS_CRYPT_50006], which can be used to determine the byte size required for a specific format. Callers are likely typically to query GetExportSize first before providing the output buffer out in order to ensure sufficient buffer capacity. Question Q-394ae08d9d7e6fa7 (open)
Error handling
In case of error, rollback semantics take effect and a corresponding error code is returned [SWS_CRYPT_10711]:
ara::crypto::CryptoErrc::kInsufficientCapacity: The passed output bufferoutis sized too small [SWS_CRYPT_10711].ara::crypto::CryptoErrc::kUnsupportedFormat: The passed format identifier is not supported for this object type [SWS_CRYPT_10711].ara::crypto::CryptoErrc::kUnsupported: Exporting the object is not supported in general [SWS_CRYPT_10711].ara::crypto::CryptoErrc::kUsageViolation: The object to be exported is a key whose usage rules do not permit plaintext export (kAllowPlaintextExport) [SWS_CRYPT_10711].
Concurrency and Constraints
The method is specified as const, noexcept, thread-safe, and exception-safe [SWS_CRYPT_10711]. Consequently, it can be executed concurrently and throws no C++ exceptions.
This usage note was generated by an AI based on the AUTOSAR specification R25-11.
Implementer's Guide to follow (complexity I1)
| Header-Datei | #include "ara/crypto/common/serializable.h" |
|---|---|
| Scope | class ara::crypto::Serializable |
| Exception-Sicherheit | exception safe |
| Thread-Sicherheit | thread-safe |
Parameter (in)
| Parameter | Beschreibung |
|---|---|
| format | identifier of the output format |
Parameter (out)
| Parameter | Beschreibung |
|---|---|
| out | an output buffer that the serialized object will be written to |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| ara::core::Result<std::size_t > | A result containing the size in bytes of the serialized object or an error. |
Fehler
| Fehlercode | Beschreibung |
|---|---|
| ara::crypto::CryptoErrc::kInsufficientCapacity | rollback_semantics if the output buffer is too small |
| ara::crypto::CryptoErrc::kUnsupportedFormat | rollback_semantics if the specified format ID is not supported for this object type |
| ara::crypto::CryptoErrc::kUnsupported | rollback_semantics if exporting the object is not supported |
| ara::crypto::CryptoErrc::kUsageViolation | rollback_semantics if the object to be exported is a key and the allowed usage of the key does not include kAllowPlaintextExport |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_CRYPT_10711- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_CRYPT_10711@rel:R25-11#6e8a805e- Content hash
6e8a805e- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_10711
Status: valid/unmigrated
Version: rel:R25-11#c8dd72d0
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_10711@rel:R25-11#c8dd72d0
Recorded Revisions (8):
- R25-11
rel:R25-11#6e8a805e2026-09-30 - R19-11
rel:R19-11#fe62960e2026-10-14 - R20-11
rel:R20-11#4cac78d62026-10-14 - R21-11
rel:R21-11#13d51a182026-10-14 - R22-11
rel:R22-11#3bb1942d2026-10-14 - R23-11
rel:R23-11#ee143e792026-10-14 - R24-11
rel:R24-11#761192782026-10-14 - R25-11
rel:R25-11#c8dd72d02026-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 · German original