función 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.
El método CalculateHashDigest realiza un cálculo one-shot síncrono de un valor hash criptográfico y escribe el resultado en el búfer de salida proporcionado [SWS_CRYPT_50060]. Se pasan como parámetros el mensaje de entrada a procesar data, el búfer de destino digest y, opcionalmente, un vector de inicialización iv. En caso de ejecución correcta, la función devuelve a través del objeto de resultado ara::core::Result<std::size_t> el número real de bytes de digest escritos [SWS_CRYPT_50060].
Manejo de errores
Si el cálculo falla, la interfaz garantiza una semántica de reversión [SWS_CRYPT_50060]. El resultado puede contener los siguientes códigos de error:
ara::crypto::CryptoErrc::kInvalidInputSize: El tamaño de los datos pasados o del vector de inicialización no es compatible [SWS_CRYPT_50060].ara::crypto::CryptoErrc::kUnsupported: El contexto no admite el cálculo mediante llamada única (single-call), o la transferencia del vector de inicialización no coincide con la configuración del contexto (IV requerido pero ausente, o bien IV transferido aunque no es compatible) [SWS_CRYPT_50060].ara::crypto::CryptoErrc::kInsufficientCapacity: La capacidad del búfer de salidadigestno es suficiente para el digest calculado [SWS_CRYPT_50060].
Concurrencia e interacción
La función está declarada como segura frente a excepciones (exception safe) y segura frente a hilos (thread-safe) [SWS_CRYPT_50060]. Para evitar de antemano errores relativos a longitudes de entrada no permitidas, el tamaño de búfer máximo permitido del contexto para una única llamada puede determinarse a través de GetMaximumChunkSize [SWS_CRYPT_50062].
Esta nota de uso fue generada automáticamente sobre la base de la especificación AUTOSAR R25-11.
Guía del implementador pendiente (complejidad 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#51ecbb29- Content hash
51ecbb29- 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 · Original en alemán