función 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.
usar
La función miembro síncrona ExportPublicly de la interfaz ara::crypto::Serializable serializa el objeto en el formato de salida especificado [SWS_CRYPT_10711]. Como parámetros se pasan el identificador de formato format (tipo FormatId) y la zona de memoria de destino out (tipo ReadWriteMem Region). En caso de ejecución correcta, la función devuelve el número real de bytes escritos en un ara::core::Result<std::size_t> [SWS_CRYPT_10711].
Interacción con funciones relacionadas
La función está en relación directa con GetExportSize [SWS_CRYPT_50006], con la cual puede determinarse el tamaño en bytes necesario para un formato determinado. Los llamadores suelen consultar primero GetExportSize antes de proporcionar el búfer de salida out para asegurar una capacidad suficiente del búfer. Pregunta Q-394ae08d9d7e6fa7 (abierta)
Manejo de errores
En caso de error, se aplican semánticas de reversión y se devuelve el código de error correspondiente [SWS_CRYPT_10711]:
ara::crypto::CryptoErrc::kInsufficientCapacity: el búfer de salida proporcionadoouttiene un tamaño insuficiente [SWS_CRYPT_10711].ara::crypto::CryptoErrc::kUnsupportedFormat: el identificador de formato proporcionado no es compatible con este tipo de objeto [SWS_CRYPT_10711].ara::crypto::CryptoErrc::kUnsupported: la exportación del objeto no se admite de forma general [SWS_CRYPT_10711].ara::crypto::CryptoErrc::kUsageViolation: el objeto que se va a exportar es una clave cuyas reglas de uso no permiten la exportación en texto claro (kAllowPlaintextExport) [SWS_CRYPT_10711].
Concurrencia y condiciones de contorno
El método está especificado como const, noexcept, seguro para subprocesos («thread-safe») y seguro frente a excepciones («exception safe») [SWS_CRYPT_10711]. En consecuencia, puede ejecutarse de forma concurrente y no lanza excepciones de C++.
Esta nota de uso fue generada por una IA sobre la base de la especificación AUTOSAR R25-11.
Guía del implementador pendiente (complejidad 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#f95b6d00- Content hash
f95b6d00- 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 · Original en alemán