fonction 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.
Utilisation
La fonction membre synchrone ExportPublicly de l'interface ara::crypto::Serializable sérialise l'objet dans le format de sortie spécifié [SWS_CRYPT_10711]. Les paramètres transmis sont l'identifiant de format format (type FormatId) ainsi que la zone mémoire de destination out (type ReadWriteMem Region). En cas de déroulement réussi, la fonction renvoie le nombre réel d'octets écrits dans un ara::core::Result<std::size_t> [SWS_CRYPT_10711].
Interaction avec des fonctions apparentées
La fonction est en relation directe avec GetExportSize [SWS_CRYPT_50006], ce qui permet de déterminer la taille en octets requise pour un format donné. Les appelants devraient typiquement interroger GetExportSize avant de fournir le tampon de sortie out afin de garantir une capacité de tampon suffisante. Question Q-394ae08d9d7e6fa7 (ouverte)
Gestion des erreurs
En cas d'erreur, des sémantiques de rollback s'appliquent et un code d'erreur correspondant est renvoyé [SWS_CRYPT_10711] :
ara::crypto::CryptoErrc::kInsufficientCapacity: le tampon de sortie transmisoutest dimensionné trop petit [SWS_CRYPT_10711].ara::crypto::CryptoErrc::kUnsupportedFormat: l'identifiant de format transmis n'est pas pris en charge pour ce type d'objet [SWS_CRYPT_10711].ara::crypto::CryptoErrc::kUnsupported: l'exportation de l'objet n'est généralement pas prise en charge [SWS_CRYPT_10711].ara::crypto::CryptoErrc::kUsageViolation: l'objet à exporter est une clé dont les règles d'utilisation n'autorisent pas l'exportation en texte clair (kAllowPlaintextExport) [SWS_CRYPT_10711].
Concurrence et contraintes
La méthode est spécifiée comme const, noexcept, thread-safe (« thread-safe ») et sûre vis-à-vis des exceptions (« exception safe ») [SWS_CRYPT_10711]. Elle peut par conséquent être exécutée de manière concurrente et ne lève aucune exception C++.
Cette note d'utilisation a été générée par une IA sur la base de la spécification AUTOSAR R25-11.
Guide de l'implémenteur à venir (complexité 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#aa9fa489- Content hash
aa9fa489- 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 allemand