função 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
A função membro síncrona ExportPublicly da interface ara::crypto::Serializable serializa o objeto no formato de saída especificado [SWS_CRYPT_10711]. Como parâmetros, são passados o identificador de formato format (tipo FormatId) e a região de memória de destino out (tipo ReadWriteMem Region). Em caso de execução bem-sucedida, a função retorna a quantidade real de bytes gravados em um ara::core::Result<std::size_t> [SWS_CRYPT_10711].
Interação com funções relacionadas
A função tem relação direta com GetExportSize [SWS_CRYPT_50006], com a qual pode ser determinado o tamanho em bytes necessário para um determinado formato. Os chamadores tipicamente consultam GetExportSize antes de fornecer o buffer de saída out, a fim de assegurar capacidade de buffer suficiente. Pergunta Q-394ae08d9d7e6fa7 (aberta)
Tratamento de erros
Em caso de erro, aplicam-se semânticas de rollback e é retornado um código de erro correspondente [SWS_CRYPT_10711]:
ara::crypto::CryptoErrc::kInsufficientCapacity: O buffer de saída fornecidoouté dimensionado de forma muito pequena [SWS_CRYPT_10711].ara::crypto::CryptoErrc::kUnsupportedFormat: O identificador de formato transmitido não é suportado para este tipo de objeto [SWS_CRYPT_10711].ara::crypto::CryptoErrc::kUnsupported: A exportação do objeto não é suportada de modo geral [SWS_CRYPT_10711].ara::crypto::CryptoErrc::kUsageViolation: O objeto a ser exportado é uma chave cujas regras de utilização não permitem a exportação em texto simples (kAllowPlaintextExport) [SWS_CRYPT_10711].
Simultaneidade e condições marginais
O método é especificado como const, noexcept, seguro para threads («thread-safe») e seguro contra exceções («exception safe») [SWS_CRYPT_10711]. Consequentemente, ele pode ser executado de forma concorrente e não lança exceções C++.
Esta nota de utilização foi gerada por uma IA com base na especificação AUTOSAR R25-11.
Guia do implementador em breve (complexidade 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#dca830aa- Content hash
dca830aa- 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 em alemão