DEENESPTFRRUARHIKOZHNL

class ara::crypto::cryp::HashFunctionCtx

[SWS_CRYPT_21100] Upstream: RS_CRYPTO_02205

class HashFunctionCtx :           public CryptoContext {...};

Hash function interface.

Header-Datei#include "ara/crypto/cryp/hash_function_ctx.h"
Forwarding-Header#include "ara/crypto/crypto_fwd.h"
Scopenamespace ara::crypto::cryp
Basisklasse(n)CryptoContext

User GuideAI-GENERATED

Calculates cryptographic hash values over continuous data streams or individual memory blocks.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: bf2cec48587e Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Calculates cryptographic hash values over continuous data streams or individual memory blocks.

The class ara::crypto::cryp::HashFunctionCtx provides the interface for calculating cryptographic hash values over memory blocks and data streams ([SWS_CRYPT_50060]). Streaming operations require compliance with the processing cycle consisting of initialization using Start(), incremental data feeding via Update(), finalization by Finish(), and subsequent retrieval via GetDigest() ([SWS_CRYPT_21116]). All methods are specified as thread-safe, guarantee rollback semantics, and report sequence or buffer errors deterministically via result objects.

Context

The class ara::crypto::cryp::HashFunctionCtx defines the interface for calculating cryptographic hash values and checksums in the module crypto of the AUTOSAR Adaptive Platform. As a specialization of CryptoContext, it provides methods for stateless one-shot calls as well as for stateful streaming operations. Lifecycle and ownership management are typically handled via the smart pointer type alias Sptr ([SWS_CRYPT_21101]), which is defined as std::shared_ptr<HashFunctionCtx>.

The essential interaction partners include:

  • Calling application: Controls the lifecycle of the calculation and passes input data block by block or as an entire message.
  • Memory areas: Input data, initialization vectors (IV), as well as output and state buffers are transported via ReadOnlyMemRegion and ReadWriteMemRegion.
  • Key objects: Cryptographic keys can be directly included as a data source in the hash calculation via CryptoObject::Sptr ([SWS_CRYPT_50057]).
  • Crypto Provider: Interpretation: instances of HashFunctionCtx are typically created via an associated Crypto Provider; exchanging exported context states strictly requires the same Crypto Provider and the same algorithm ID ([SWS_CRYPT_50065]). Question Q-8365d4bee96bbf67 (open)

Lifecycle

An instance of HashFunctionCtx transitions through several discrete states during streaming processing:

hash_states Bereit Bereit InVerarbeitung InVerarbeitung Bereit->InVerarbeitung Start() / Start(iv) Bereit->InVerarbeitung ImportContextState() InVerarbeitung->Bereit Cancel() / Start() InVerarbeitung->InVerarbeitung Update() / GetIntermediateDigest() Abgeschlossen Abgeschlossen InVerarbeitung->Abgeschlossen Finish() Unterbrochen Unterbrochen InVerarbeitung->Unterbrochen ExportContextState() Abgeschlossen->Bereit Start()

State diagram: State transitions of the hash context during initialization, processing, and completion. Sources: [SWS_CRYPT_50152], [SWS_CRYPT_50153], [SWS_CRYPT_21113], [SWS_CRYPT_50058], [SWS_CRYPT_21115], [SWS_CRYPT_50064], [SWS_CRYPT_50065]

After creation, the context is in the unstarted state. By calling Start() without an IV ([SWS_CRYPT_50152]) or Start(iv) with an initialization vector ([SWS_CRYPT_50153]), the context transitions into the active processing phase. Calculations already in progress are implicitly discarded by another start call.

In the processing state, input data is accumulated via repeated calls to Update() with raw chunk data ([SWS_CRYPT_21113]) or keys ([SWS_CRYPT_50057]). Via GetIntermediateDigest(), an intermediate result can be calculated without finalizing the context or interrupting the data stream ([SWS_CRYPT_50059]). An ongoing streaming operation can be aborted at any time using Cancel() ([SWS_CRYPT_50058]), causing the context to return to the unstarted state.

Calling Finish() transitions the context into the "completed" state ([SWS_CRYPT_21115]). Only in this state can the resulting hash value be extracted via GetDigest() ([SWS_CRYPT_21116]) or checked directly against an expected value via Compare() ([SWS_CRYPT_50154]).

To suspend and later resume calculations, the required buffer size can be queried using GetContextStateSize() ([SWS_CRYPT_50063]) and the internal state can be saved via ExportContextState() ([SWS_CRYPT_50064]). Resumption takes place via ImportContextState() ([SWS_CRYPT_50065]). All interface methods are declared exception-safe (exception safe) and thread-safe (thread-safe).

Usage Path

The class supports two processing modes: direct one-shot calculation and segmented streaming processing.

One-shot calculation is performed via CalculateHashDigest() ([SWS_CRYPT_50060]). Here, input data, an optional IV, and the destination memory area are passed, and the hash value is calculated in an atomic operation.

For larger amounts of data or continuous data streams, the streaming path is used:

Streaming processing of a hash valueApplicationHashFunctionCtxStart()Result<void>loopFor each data blockUpdate(data)Result<void>Finish()Result<void>GetDigest(digest)Result<std::size_t>

Sequence diagram: Typical flow of streaming calculation via Start, Update, Finish, and GetDigest. Sources: [SWS_CRYPT_50152], [SWS_CRYPT_21113], [SWS_CRYPT_21115], [SWS_CRYPT_21116]

  1. Capacity check: Querying the output size via GetDigestSize() ([SWS_CRYPT_50061]) and the maximum block size via GetMaximumChunkSize() ([SWS_CRYPT_50062]).
  2. Initialization: Preparing the context by calling Start() ([SWS_CRYPT_50152]) or Start(iv) ([SWS_CRYPT_50153]).
  3. Data transfer: Successive passing of data blocks via Update(data) ([SWS_CRYPT_21113]) or keys via Update(key) ([SWS_CRYPT_50057]).
  4. Finalization: Terminating the hash value accumulation by Finish() ([SWS_CRYPT_21115]).
  5. Result evaluation: Reading the calculated hash value using GetDigest() ([SWS_CRYPT_21116]) or in-place comparison with a reference value via Compare() ([SWS_CRYPT_50154]).

Error Scenarios

Methods of HashFunctionCtx signal errors via ara::core::Result and guarantee rollback semantics in the event of errors. Typical error causes are:

This guide is based on the AUTOSAR Adaptive Platform R25-11 specification.

Member map

Class diagram

Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.

G nara__crypto__cryp__HashFunctionCtx412 HashFunctionCtx + CalculateHashDigest() + Cancel() + Compare() + ExportContextState() + Finish() + GetContextStateSize() + GetDigest() + GetDigestSize() + GetIntermediateDigest() + GetMaximumChunkSize() + ImportContextState() + Start() + Update() nara__crypto__cryp__CryptoContext85 CryptoContext nara__crypto__cryp__HashFunctionCtx412->nara__crypto__cryp__CryptoContext85

Detail view

Select an entry in the outline.

Methods

Calculate the hash digest and write the the calculated digest into the provided output buffer.

virtual ara::core::Result< std::size_t > CalculateHashDigest (ReadOnly MemRegion data, ReadWriteMemRegion digest, ara::core::Optional< Read OnlyMemRegion > iv) const noexcept=0;
Cancel function

Cancel the ongoing streaming operation that has been initiated by Start() and has not yet been finished.

virtual ara::core::Result< void > Cancel () noexcept=0;
Compare function

Compare the size and content of the calculated digest against an expected value.

virtual ara::core::Result< bool > Compare (ReadOnlyMemRegion expected) const noexcept=0;

Write the current state of this hash context into the provided output buffer contextState. This function can be used to suspend an ongoing hash operation and resume it at a later point in time.

virtual ara::core::Result< void > ExportContextState (ReadWriteMem Region contextState) const noexcept=0;
Finish function

Finish the digest calculation.

virtual ara::core::Result< void > Finish () noexcept=0;

Get the buffer size required to store the state of this context using ExportContextState()

virtual ara::core::Result< std::size_t > GetContextStateSize () const noexcept=0;
GetDigest function

Write the calculated hash digest into the provided output buffer.

virtual ara::core::Result< std::size_t > GetDigest (ReadWriteMemRegion digest) const noexcept=0;
GetDigestSize function

Get the output digest size.

virtual ara::core::Result< std::size_t > GetDigestSize () const noexcept=0;

Calculate the hash digest with the data provided to the hash context and write the calculated hash digest into the provided output buffer. The hash digest is equal to the hash digest returned when calling Finish() and GetDigest(), however, after calling GetIntermediateDigest(), this context can still be updated with additional data.

virtual ara::core::Result< std::size_t > GetIntermediateDigest (Read WriteMemRegion digest) const noexcept=0;

Get the maximum input buffer size supported for processing in single calls to Update(), Finish(), or CalculateHashDigest() by this context.

virtual ara::core::Result< std::size_t > GetMaximumChunkSize () const noexcept=0;

Set the current state of this hash context to the state provided by contextState. This function can be used to resume a previously suspended hash operation. The contextState must have been exported from a HashFunctionCtx with the same AlgorithmId provided by the same Crypto Provider as the current context using the function ExportContextState(). The current state of this context (e.g., any ongoing hash calculation) will be replaced by the state provided to this function.

virtual ara::core::Result< void > ImportContextState (ReadOnlyMem Region contextState) noexcept=0;
Start function 2

Initialize the context for processing of a hash digest without an IV. Will cancel any ongoing hash calculation.

Overloads Start 2
virtual ara::core::Result< void > Start () noexcept=0; SWS_CRYPT_50152
virtual ara::core::Result< void > Start (ReadOnlyMemRegion iv) noexcept=0; SWS_CRYPT_50153
Update function 2

Update the digest calculation context by a new part of the message.

Overloads Update 2
virtual ara::core::Result< void > Update (ReadOnlyMemRegion data) noexcept=0; SWS_CRYPT_21113
virtual ara::core::Result< void > Update (CryptoObject::Sptr key) noexcept=0; SWS_CRYPT_50057

Type aliases

Sptr type alias

Smart pointer of the interface.

Method documentation

function 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.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: adb7aefb7feb Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The CalculateHashDigest method performs a synchronous one-shot calculation of a cryptographic hash value and writes the result into the provided output buffer [SWS_CRYPT_50060]. The input message data to be processed, the destination buffer digest, and optionally an initialization vector iv are passed as parameters. Upon successful execution, the function returns the actual number of written digest bytes via the result object ara::core::Result<std::size_t> [SWS_CRYPT_50060].

Error handling

If the calculation fails, the interface guarantees rollback semantics [SWS_CRYPT_50060]. The following error codes can be contained in the result:

  • ara::crypto::CryptoErrc::kInvalidInputSize: The size of the passed data or of the initialization vector is not supported [SWS_CRYPT_50060].
  • ara::crypto::CryptoErrc::kUnsupported: Single-call calculation is not supported by the context, or the passing of the initialization vector does not match the configuration of the context (IV required but missing, or IV passed although not supported) [SWS_CRYPT_50060].
  • ara::crypto::CryptoErrc::kInsufficientCapacity: The capacity of the output buffer digest is not sufficient for the calculated digest [SWS_CRYPT_50060].

Concurrency and Interaction

The function is declared as exception-safe (exception safe) and thread-safe (thread-safe) [SWS_CRYPT_50060]. To avoid errors regarding impermissible input lengths in advance, the maximum buffer size permitted for a single call of the context can be determined via GetMaximumChunkSize [SWS_CRYPT_50062].

This usage note was generated automatically based on the AUTOSAR specification R25-11.

Implementer's Guide to follow (complexity I1)

Header-Datei#include "ara/crypto/cryp/hash_function_ctx.h"
Scopeclass ara::crypto::cryp::HashFunctionCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
datathe input message that should be processed
ivan optional initialization vector

Parameter (out)

ParameterBeschreibung
digestan output data buffer that the digest will be written into.

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >A result containing the size in bytes of the digest or an error.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of provided data or IV is not supported
ara::crypto::CryptoErrc::kUnsupportedrollback_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::kInsufficientCapacityrollback_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#29fd4c6d
Content hash
29fd4c6d
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
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function Cancel [SWS_CRYPT_50058] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< void > Cancel () noexcept=0;

Cancel the ongoing streaming operation that has been initiated by Start() and has not yet been finished.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 5c8d759c011a Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

The method Cancel() serves to purposefully abort an ongoing streaming operation that was previously started via method Start() and has not yet been regularly completed [SWS_CRYPT_50058]. The call is synchronous and parameterless on an instance of ara::crypto::cryp::HashFunctionCtx from header file ara/crypto/cryp/hash_function_ctx.h [SWS_CRYPT_50058]. Upon successful execution, the operation returns an empty ara::core::Result<void> [SWS_CRYPT_50058].

Error handling

If a problem occurs during execution, the returned ara::core::Result contains a corresponding error value [SWS_CRYPT_50058]. If processing was not initiated by Start() prior to calling Cancel(), the abort fails and returns the specific error code ara::crypto::CryptoErrc::kProcessingNotStarted with rollback semantics [SWS_CRYPT_50058].

Concurrency and Limitations

The interface is defined as thread-safe and exception safe and declared with noexcept [SWS_CRYPT_50058]. As an essential functional precondition, data processing must be in an active state created by a preceding Start() call [SWS_CRYPT_50058].

Interaction

The pattern implemented by Cancel() is standardized across various streaming contexts of the crypto stack. Exactly matching semantics and error signaling are also exhibited by the contexts VerifierPublicCtx [SWS_CRYPT_50023], MessageAuthnCodeCtx [SWS_CRYPT_50027], SignerPrivateCtx [SWS_CRYPT_50041], SymmetricCipherCtx [SWS_CRYPT_50046], DecryptorPrivateCtx [SWS_CRYPT_50069], AuthCipherCtx [SWS_CRYPT_50077], and EncryptorPublicCtx [SWS_CRYPT_50089].

This usage note is based on the specification of AUTOSAR Adaptive R25-11.

Implementer's Guide to follow (complexity I1)

Header-Datei#include "ara/crypto/cryp/hash_function_ctx.h"
Scopeclass ara::crypto::cryp::HashFunctionCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
ara::core::Result< void >an empty result if the ongoing streaming operation was cancelled successfully, or a result containing an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotStartedrollback_semantics if data processing was not started by a call of the Start() method

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50058
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50058@rel:R25-11#69ced25c
Content hash
69ced25c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50058
Status: valid/unmigrated Version: rel:R25-11#69ced25c 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_50058@rel:R25-11#69ced25c
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function Compare [SWS_CRYPT_50154] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< bool > Compare (ReadOnlyMemRegion expected) const noexcept=0;

Compare the size and content of the calculated digest against an expected value.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 1c3bf0837502 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The method Compare of class ara::crypto::cryp::HashFunctionCtx ([SWS_CRYPT_50154]) synchronously compares the size and content of a previously calculated hash digest with an expected reference value. The nominal value is passed via the parameter expected of type ReadOnlyMemRegion. In case of success, the function returns a ara::core::Result<bool> that contains true if and only if the expected byte sequence is identical to the calculated digest.

A precondition for the call is that the digest calculation was previously completed with the method Finish(). If this is not the case, the call fails and returns the error ara::crypto::CryptoErrc::kProcessingNotFinished with rollback semantics ([SWS_CRYPT_50154]). Interpretation: A deviating length or unequal content of expected presumably does not lead to an error code, but to a regular false in the result object. Question Q-fdd0ecaec22f6985 (open)

Regarding concurrency, the method is specified as thread-safe and exception safe ([SWS_CRYPT_50154]). Due to the declaration as noexcept, it does not throw any C++ exceptions.

The same verification pattern is used in related crypto contexts: For Message Authentication Codes, ara::crypto::cryp::MessageAuthnCodeCtx::Compare ([SWS_CRYPT_50133]) compares the size and content of the calculated MAC value, while CompareSubspan ([SWS_CRYPT_50028]) verifies the most significant bits. Both methods likewise require a previously finished calculation.

This text was generated by an AI based on the AUTOSAR R25-11 specification.

Header-Datei#include "ara/crypto/cryp/hash_function_ctx.h"
Scopeclass ara::crypto::cryp::HashFunctionCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
expectedthe memory region containing an expected digest value

Rückgabewert

TypBeschreibung
ara::core::Result< bool >true if the expected byte sequence is identical to the calculated digest

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotFinishedrollback_semantics if the digest calculation was not finished by a call of the Finish() method

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50154
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50154@rel:R25-11#d6c1faba
Content hash
d6c1faba
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50154
Status: valid/unmigrated Version: rel:R25-11#d6c1faba 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_50154@rel:R25-11#d6c1faba
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function ExportContextState [SWS_CRYPT_50064] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< void > ExportContextState (ReadWriteMem Region contextState) const noexcept=0;

Write the current state of this hash context into the provided output buffer contextState. This function can be used to suspend an ongoing hash operation and resume it at a later point in time.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 78b3b1c67b6a Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The [SWS_CRYPT_50064] method of class ara::crypto::cryp::HashFunctionCtx synchronously writes the current state of a hash context into the passed output buffer contextState of type ReadWriteMem Region. This enables applications to suspend an ongoing cryptographic hash operation and resume it at a later point in time. Upon successful execution, the call returns an empty ara::core::Result<void>.

Interaction and Buffer Dimensioning

To prevent memory errors, the strictly required buffer size in bytes should be queried beforehand via the [SWS_CRYPT_50063] function. The exported state can later be re-imported into a hash context using [SWS_CRYPT_50065]. A prerequisite for this is that the target context has the same AlgorithmId and is provided by the same Crypto Provider as the source context. During import, any existing computational state is completely overwritten.

Error handling

If the operation fails, an error is returned in ara::core::Result. The following error codes from ara::crypto::CryptoErrc are specified:

  • ara::crypto::CryptoErrc::kUnsupported: The concrete context does not support exporting or importing states.
  • ara::crypto::CryptoErrc::kInsufficientCapacity: The capacity of the passed buffer contextState is not sufficient to hold the state.

Rollback semantics are defined for both error cases, so that the state of the object remains unchanged.

Concurrency and Execution Safety

The interface is declared as const and noexcept. According to the specification, the call is both thread-safe and exception-safe.

This usage note was generated automatically based on the AUTOSAR specification.

Implementer's Guide to follow (complexity I1)

Header-Datei#include "ara/crypto/cryp/hash_function_ctx.h"
Scopeclass ara::crypto::cryp::HashFunctionCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (out)

ParameterBeschreibung
contextStatean output data buffer that the state of the context will be written into.

Rückgabewert

TypBeschreibung
ara::core::Result< void >An empty result on success or an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if this context does not support im-/exporting the context state
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_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_50064
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50064@rel:R25-11#10cf645c
Content hash
10cf645c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50064
Status: valid/unmigrated Version: rel:R25-11#10cf645c 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_50064@rel:R25-11#10cf645c
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function Finish [SWS_CRYPT_21115] Upstream: RS_CRYPTO_02302, RS_CRYPTO_02205

virtual ara::core::Result< void > Finish () noexcept=0;

Finish the digest calculation.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 3afea8abb39d Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

The synchronous method Finish() finalizes the calculation of a hash value in ara::crypto::cryp::HashFunctionCtx [SWS_CRYPT_21115]. The parameterless call returns a ara::core::Result<void> that signals successful completion or encapsulates an error [SWS_CRYPT_21115]. The interface is declared as noexcept and specified as exception safe (exception safe) and thread-safe (thread-safe) [SWS_CRYPT_21115].

Error Handling and Concurrency

If the hash calculation was not successfully started prior to the call, the method fails with the error ara::crypto::CryptoErrc::kInvalidUsageOrder [SWS_CRYPT_21115]. A rollback semantics is defined for this error case, so callers must strictly ensure a properly started context prior to finalization [SWS_CRYPT_21115].

Interaction

After a successful call to Finish(), the calculated hash digest is typically transferred into a provided buffer using GetDigest() [SWS_CRYPT_21116], [SWS_CRYPT_50059]. GetIntermediateDigest() serves for distinction: this function provides the same hash value as the sequence of Finish() and GetDigest(), but allows further data to be passed afterward [SWS_CRYPT_50059]. Interpretation: After the call of Finish(), the calculation is likely to be completed finally and the context will no longer accept additional data. Question Q-f4daf29364f45fd5 (open) Permissible buffer sizes for processing steps in the context can be queried via GetMaximumChunkSize() [SWS_CRYPT_50062].

This usage note was generated automatically based on AUTOSAR specification R25-11.

Header-Datei#include "ara/crypto/cryp/hash_function_ctx.h"
Scopeclass ara::crypto::cryp::HashFunctionCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
ara::core::Result< void >An empty result or an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kInvalidUsageOrderrollback_semantics the hash calculation has not been started successfully.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_21115
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_21115@rel:R25-11#5c49c112
Content hash
5c49c112
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_21115
Status: valid/unmigrated Version: rel:R25-11#03ec3455 Versionshistorie & Revisions (1 transition, 7 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_21115@rel:R25-11#03ec3455
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#5c49c1122026-09-30
  • R20-11rel:R20-11#23a4ded62026-10-14
  • R21-11rel:R21-11#33ec9dc92026-10-14
  • R22-11rel:R22-11#13315a192026-10-14
  • R23-11rel:R23-11#6b14e99d2026-10-14
  • R24-11rel:R24-11#de528ef72026-10-14
  • R25-11rel:R25-11#03ec34552026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function GetContextStateSize [SWS_CRYPT_50063] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< std::size_t > GetContextStateSize () const noexcept=0;

Get the buffer size required to store the state of this context using ExportContextState()

Header-Datei#include "ara/crypto/cryp/hash_function_ctx.h"
Scopeclass ara::crypto::cryp::HashFunctionCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >A result containing required context state buffer size in bytes or an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if this context does not support im-/exporting the context state

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50063
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50063@rel:R25-11#c5c390c7
Content hash
c5c390c7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50063
Status: valid/unmigrated Version: rel:R25-11#c5c390c7 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_50063@rel:R25-11#c5c390c7
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function GetDigest [SWS_CRYPT_21116] Upstream: RS_CRYPTO_02205

virtual ara::core::Result< std::size_t > GetDigest (ReadWriteMemRegion digest) const noexcept=0;

Write the calculated hash digest into the provided output buffer.

Header-Datei#include "ara/crypto/cryp/hash_function_ctx.h"
Scopeclass ara::crypto::cryp::HashFunctionCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (out)

ParameterBeschreibung
digestan output data buffer that the hash digest will be written into

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >A result containing the size in bytes of the hash digest or an error.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotFinishedrollback_semantics if the hash calculation was not finished by a call of the Finish() method
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_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_21116
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_21116@rel:R25-11#d36ab796
Content hash
d36ab796
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_21116
Status: valid/unmigrated Version: rel:R25-11#5176bc54 Versionshistorie & Revisions (1 transition, 7 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_21116@rel:R25-11#5176bc54
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#d36ab7962026-09-30
  • R20-11rel:R20-11#6044ba662026-10-14
  • R21-11rel:R21-11#c195cbba2026-10-14
  • R22-11rel:R22-11#32e02a4e2026-10-14
  • R23-11rel:R23-11#7888ecb32026-10-14
  • R24-11rel:R24-11#96e2c5772026-10-14
  • R25-11rel:R25-11#5176bc542026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function GetDigestSize [SWS_CRYPT_50061] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< std::size_t > GetDigestSize () const noexcept=0;

Get the output digest size.

Header-Datei#include "ara/crypto/cryp/hash_function_ctx.h"
Scopeclass ara::crypto::cryp::HashFunctionCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >A result containing the size of the output from this digest-function in bytes or an error

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50061
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50061@rel:R25-11#739a55c8
Content hash
739a55c8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50061
Status: valid/unmigrated Version: rel:R25-11#739a55c8 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_50061@rel:R25-11#739a55c8
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function GetIntermediateDigest [SWS_CRYPT_50059] Upstream: RS_CRYPTO_02205

virtual ara::core::Result< std::size_t > GetIntermediateDigest (Read WriteMemRegion digest) const noexcept=0;

Calculate the hash digest with the data provided to the hash context and write the calculated hash digest into the provided output buffer. The hash digest is equal to the hash digest returned when calling Finish() and GetDigest(), however, after calling GetIntermediateDigest(), this context can still be updated with additional data.

Header-Datei#include "ara/crypto/cryp/hash_function_ctx.h"
Scopeclass ara::crypto::cryp::HashFunctionCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (out)

ParameterBeschreibung
digestan output data buffer that the hash digest will be written into

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >A result containing the size in bytes of the hash digest or an error.

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kInvalidUsageOrderrollback_semantics the hash calculation has not been started successfully.
ara::crypto::CryptoErrc::kInsufficientCapacityrollback_semantics if the output buffer is too small
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if this context does not support getting an intemediate digest

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50059
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50059@rel:R25-11#9bc73898
Content hash
9bc73898
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50059
Status: valid/unmigrated Version: rel:R25-11#9bc73898 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_50059@rel:R25-11#9bc73898
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function GetMaximumChunkSize [SWS_CRYPT_50062] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< std::size_t > GetMaximumChunkSize () const noexcept=0;

Get the maximum input buffer size supported for processing in single calls to Update(), Finish(), or CalculateHashDigest() by this context.

Header-Datei#include "ara/crypto/cryp/hash_function_ctx.h"
Scopeclass ara::crypto::cryp::HashFunctionCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
ara::core::Result<std::size_t >A result containing the maximum buffer size in bytes or an error

Fehler

FehlercodeBeschreibung
This function does not specify any standardized errors.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50062
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50062@rel:R25-11#17fdd281
Content hash
17fdd281
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50062
Status: valid/unmigrated Version: rel:R25-11#17fdd281 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_50062@rel:R25-11#17fdd281
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function ImportContextState [SWS_CRYPT_50065] Upstream: RS_CRYPTO_02309

virtual ara::core::Result< void > ImportContextState (ReadOnlyMem Region contextState) noexcept=0;

Set the current state of this hash context to the state provided by contextState. This function can be used to resume a previously suspended hash operation. The contextState must have been exported from a HashFunctionCtx with the same AlgorithmId provided by the same Crypto Provider as the current context using the function ExportContextState(). The current state of this context (e.g., any ongoing hash calculation) will be replaced by the state provided to this function.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 16a68c3d97e9 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The ImportContextState method of class ara::crypto::cryp::HashFunctionCtx (defined in ara/crypto/cryp/hash_function_ctx.h) serves to restore the internal state of a hash context from a passed buffer, thereby continuing a previously interrupted hash operation [SWS_CRYPT_50065]. Any ongoing calculation state of the current context is completely replaced by the imported state [SWS_CRYPT_50065].

Call and Preconditions

The synchronous call takes place via the signature ImportContextState(ReadOnlyMem Region contextState) noexcept and returns a ara::core::Result<void> [SWS_CRYPT_50065]. The following mandatory prerequisites apply to the parameter contextState:

  • The data buffer must have been previously exported from an instance of HashFunctionCtx using the ExportContextState() method [SWS_CRYPT_50065].
  • The source context must have had the same AlgorithmId and must have been provided by the same Crypto Provider as the target context [SWS_CRYPT_50065].

Error Handling and Concurrency

In case of an error, an error code with rollback semantics is returned, so that the existing state of the context remains unchanged in case of failure [SWS_CRYPT_50065]:

  • ara::crypto::CryptoErrc::kInvalidArgument: The argument contextState contains invalid data [SWS_CRYPT_50065].
  • ara::crypto::CryptoErrc::kUnsupported: The specific context does not support exporting and importing context states [SWS_CRYPT_50065].

The operation is specified as thread-safe and exception safe [SWS_CRYPT_50065].

This usage note is based on the specification AUTOSAR Adaptive Release R25-11.

Implementer's Guide to follow (complexity I1)

Header-Datei#include "ara/crypto/cryp/hash_function_ctx.h"
Scopeclass ara::crypto::cryp::HashFunctionCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
contextStatea data buffer that contains a previously exported state of the context

Rückgabewert

TypBeschreibung
ara::core::Result< void >An empty result on success or an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if this context does not support im-/exporting the context state
ara::crypto::CryptoErrc::kInvalidArgumentrollback_semantics if the contextState argument contains invalid data

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50065
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50065@rel:R25-11#7db4f4c5
Content hash
7db4f4c5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50065
Status: valid/unmigrated Version: rel:R25-11#7db4f4c5 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_50065@rel:R25-11#7db4f4c5
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function Start [SWS_CRYPT_50152] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< void > Start () noexcept=0;

Initialize the context for processing of a hash digest without an IV. Will cancel any ongoing hash calculation.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 6588b8251bb2 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The method Start() of interface ara::crypto::cryp::HashFunctionCtx initializes the context for the incremental calculation of a hash value without an initialization vector (IV) [SWS_CRYPT_50152]. A repeated call aborts any hash calculation that may already be in progress and sets up the context for a new calculation [SWS_CRYPT_50152].

The function is synchronous, takes no parameters, and returns an ara::core::Result<void> [SWS_CRYPT_50152]. If an error occurs during initialization, rollback semantics apply with the following specific error codes [SWS_CRYPT_50152]:

  • ara::crypto::CryptoErrc::kUnsupported: The hash function used strictly expects an initialization vector [SWS_CRYPT_50152].
  • ara::crypto::CryptoErrc::kBusyResource: An internal resource strictly required for the operation is occupied [SWS_CRYPT_50152].

With respect to concurrency, the method is specified as thread-safe as well as exception safe and declared as noexcept [SWS_CRYPT_50152]. After successful initialization, message parts can be fed sequentially via the method Update() of the context [SWS_CRYPT_21113]. Because the call aborts ongoing calculations, the function should in practice also serve as a reset mechanism before a restart. Question Q-9c369489a6c6e8cb (open)

This usage note was generated automatically based on the AUTOSAR specification for R25-11.

Implementer's Guide to follow (complexity I1)

Header-Datei#include "ara/crypto/cryp/hash_function_ctx.h"
Scopeclass ara::crypto::cryp::HashFunctionCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
ara::core::Result< void >An empty result or an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics the used hash function expects an IV
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics a required resource is busy

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50152
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50152@rel:R25-11#b2ed1e78
Content hash
b2ed1e78
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50152
Status: valid/unmigrated Version: rel:R25-11#b2ed1e78 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_50152@rel:R25-11#b2ed1e78
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function Start [SWS_CRYPT_50153] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< void > Start (ReadOnlyMemRegion iv) noexcept=0;

Initialize the context for processing of a hash digest with an IV. Will cancel any ongoing hash calculation.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 3e6743c0173b Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

The function Start of interface ara::crypto::cryp::HashFunctionCtx initializes the context for calculating a hash digest using an initialization vector (IV) [SWS_CRYPT_50153]. The initialization vector iv is passed as a parameter via a ReadOnlyMemRegion [SWS_CRYPT_50153]. The synchronous call returns an ara::core::Result<void>, which contains no return value in the success case [SWS_CRYPT_50153]. A call also aborts any hash calculation that may already be in progress on this context [SWS_CRYPT_50153].

Error handling

If an error occurs during initialization, a corresponding error code is returned, with rollback semantics being guaranteed for all error cases [SWS_CRYPT_50153]:

  • ara::crypto::CryptoErrc::kInvalidInputSize: The size of the provided initialization vector is not supported [SWS_CRYPT_50153].
  • ara::crypto::CryptoErrc::kUnsupported: The underlying hash function does not use an initialization vector [SWS_CRYPT_50153].
  • ara::crypto::CryptoErrc::kBusyResource: A resource required for initialization is occupied [SWS_CRYPT_50153].

Concurrency and Interaction

The interface is declared as noexcept and specified as thread-safe (thread-safe) and exception-safe (exception safe) [SWS_CRYPT_50153]. In the typical sequence, the call forms the precondition for the subsequent incremental processing of the input message via method Update [SWS_CRYPT_21113].

This usage note was automatically created based on AUTOSAR specification R25-11.

Implementer's Guide to follow (complexity I1)

Header-Datei#include "ara/crypto/cryp/hash_function_ctx.h"
Scopeclass ara::crypto::cryp::HashFunctionCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
ivthe used Initialization Vector (IV)

Rückgabewert

TypBeschreibung
ara::core::Result< void >An empty result or an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics the size of provided IV is not supported
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics the used hash function does not use an IV
ara::crypto::CryptoErrc::kBusyResourcerollback_semantics a required resource is busy

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50153
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50153@rel:R25-11#8543358e
Content hash
8543358e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50153
Status: valid/unmigrated Version: rel:R25-11#8543358e 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_50153@rel:R25-11#8543358e
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function Update [SWS_CRYPT_21113] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< void > Update (ReadOnlyMemRegion data) noexcept=0;

Update the digest calculation context by a new part of the message.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: fe6681ce0628 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous method Update serves in [SWS_CRYPT_21113] for the incremental update of an ongoing hash calculation context (ara::crypto::cryp::HashFunctionCtx). Via the parameter data (ReadOnlyMemRegion), part of the input message to be processed is passed. The function returns a ara::core::Result<void> that is empty in case of success or encapsulates a corresponding error code.

Regarding error behavior, the method provides rollback semantics for two specific error states:

  • ara::crypto::CryptoErrc::kProcessingNotStarted: The calculation was not previously initiated by a call to the method Start() [SWS_CRYPT_21113].
  • ara::crypto::CryptoErrc::kInvalidInputSize: The size of the passed data is not supported by the context [SWS_CRYPT_21113].

Clear sequencing and size conditions apply to the call context: Before data is passed, the hashing process must have been initialized [SWS_CRYPT_21113]. To avoid kInvalidInputSize, the maximum permissible block size for a single Update call can be determined beforehand via GetMaximumChunkSize [SWS_CRYPT_50062]. According to the specification, the function is declared as exception safe (exception safe) and thread-safe (thread-safe) [SWS_CRYPT_21113].

In interaction with other interfaces, an overload exists within HashFunctionCtx for passing key objects via Update(CryptoObject::Sptr) [SWS_CRYPT_50057]. After feeding all data blocks, finalization of the checksum is presumably likely to take place via Finish() [SWS_CRYPT_50062]. Question Q-dcac20f353ca55f4 (open)

This usage note was generated automatically based on the specification.

Header-Datei#include "ara/crypto/cryp/hash_function_ctx.h"
Scopeclass ara::crypto::cryp::HashFunctionCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
dataa part of the input message that should be processed

Rückgabewert

TypBeschreibung
ara::core::Result< void >An empty result or an error

Fehler

FehlercodeBeschreibung
ara::crypto::CryptoErrc::kProcessingNotStartedrollback_semantics if the digest calculation was not initiated by a call of the Start() method
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of provided data is not supported

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_21113
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_21113@rel:R25-11#a256303e
Content hash
a256303e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_21113
Status: valid/unmigrated Version: rel:R25-11#1061ad76 Versionshistorie & Revisions (1 transition, 7 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_21113@rel:R25-11#1061ad76
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#a256303e2026-09-30
  • R20-11rel:R20-11#c42a6b602026-10-14
  • R21-11rel:R21-11#8395b3922026-10-14
  • R22-11rel:R22-11#c133132e2026-10-14
  • R23-11rel:R23-11#68132f692026-10-14
  • R24-11rel:R24-11#0809f9622026-10-14
  • R25-11rel:R25-11#1061ad762026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function Update [SWS_CRYPT_50057] Upstream: RS_CRYPTO_02302

virtual ara::core::Result< void > Update (CryptoObject::Sptr key) noexcept=0;

Update the digest calculation context by a new part of the message.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 87fb2c080f4a Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous method Update in [SWS_CRYPT_50057] serves to incrementally extend the context of a hash value calculation in ara::crypto::cryp::HashFunctionCtx with a new message section in the form of a key object. A smart pointer to the key object (CryptoObject::Sptr key) is passed as a parameter. The call returns a ara::core::Result<void>, which is empty upon successful processing or encapsulates a corresponding error code in case of an error [SWS_CRYPT_50057].

The sequencing requirement is that the calculation must strictly have been initiated previously by calling Start(); otherwise, the error ProcessingNotStarted is reported [SWS_CRYPT_50057]. Other specific error cases include (each with rollback semantics) [SWS_CRYPT_50057]:

  • ara::crypto::CryptoErrc::kUnsupported, if the hash context generally does not support hashing keys,
  • ara::crypto::CryptoErrc::kIncompatibleObject, if the passed key object is not compatible with the context,
  • ara::crypto::CryptoErrc::kUsageViolation, provided that the permitted usage of the key does not include kAllowHash Calculation,
  • ara::crypto::CryptoErrc::kInvalidInputSize, if the data size of the passed key is not supported.

The method is declared thread-safe and exception safe (noexcept) [SWS_CRYPT_50057]. In interaction with other interfaces of the module, the maximum permitted buffer size for individual Update calls can be determined via GetMaximumChunkSize() [SWS_CRYPT_50062]. For regular message parts without a key object, the overload Update(ReadOnlyMemRegion data) exists in parallel in HashFunctionCtx [SWS_CRYPT_21113].

This usage note was created automatically based on the specification.

Header-Datei#include "ara/crypto/cryp/hash_function_ctx.h"
Scopeclass ara::crypto::cryp::HashFunctionCtx
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe ara::crypto::CryptoErrc::k rollback_semantics

Parameter (in)

ParameterBeschreibung
keya part of the input message that should be processed

Rückgabewert

TypBeschreibung
ara::core::Result< void >An empty result or an error

Fehler

FehlercodeBeschreibung
ProcessingNotStartedif the digest calculation was not initiated by a call of the Start() method
ara::crypto::CryptoErrc::kInvalidInputSizerollback_semantics if the size of provided data is not supported
ara::crypto::CryptoErrc::kUnsupportedrollback_semantics if this context does not support hashing of keys
ara::crypto::CryptoErrc::kIncompatibleObjectrollback_semantics if the provided key is incompatible with this context
ara::crypto::CryptoErrc::kUsageViolationrollback_semantics if the allowed usage of the key does not include kAllowHash Calculation

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_50057
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_50057@rel:R25-11#6d3cf021
Content hash
6d3cf021
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50057
Status: valid/unmigrated Version: rel:R25-11#6d3cf021 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_50057@rel:R25-11#6d3cf021
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

Type alias documentation

type alias Sptr [SWS_CRYPT_21101] Upstream: RS_CRYPTO_02205

using Sptr = std::shared_ptr<HashFunctionCtx>;

Smart pointer of the interface.

Header-Datei#include "ara/crypto/cryp/hash_function_ctx.h"
Scopeclass ara::crypto::cryp::HashFunctionCtx
SymbolSptr

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CRYPT_21101
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_21101@rel:R25-11#806f0f39
Content hash
806f0f39
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_21101
Status: valid/unmigrated Version: rel:R25-11#6b0a2315 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_21101@rel:R25-11#6b0a2315
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#806f0f392026-09-30
  • R19-11rel:R19-11#d559cb4a2026-10-14
  • R20-11rel:R20-11#6ba26a492026-10-14
  • R21-11rel:R21-11#6ba26a492026-10-14
  • R22-11rel:R22-11#49c7b6f72026-10-14
  • R23-11rel:R23-11#cfd4adfd2026-10-14
  • R24-11rel:R24-11#cfd4adfd2026-10-14
  • R25-11rel:R25-11#6b0a23152026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill