DEENESPTFRRUARHIKOZHNL

클래스 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

사용자 가이드AI 생성

연속적인 데이터 스트림 또는 개별 메모리 블록에 대한 암호화 해시값을 계산합니다.
AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: bf2cec48587e 출처 열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

연속적인 데이터 스트림 또는 개별 메모리 블록에 대한 암호화 해시값을 계산합니다.

ara::crypto::cryp::HashFunctionCtx 클래스는 메모리 블록 및 데이터 스트림에 대한 암호화 해시값을 계산하기 위한 인터페이스를 제공합니다([SWS_CRYPT_50060]). 스트리밍 연산은 Start()을(를) 통한 초기화, Update()을(를) 통한 점진적 데이터 전달, Finish()에 의한 최종화 및 이후 GetDigest()([SWS_CRYPT_21116])를 통한 판독으로 구성된 처리 주기를 준수해야 합니다. 모든 메서드는 스레드 안전하도록 명시되어 있고, 롤백 시맨틱을 보장하며, 순서 또는 버퍼 오류를 결과 객체를 통해 결정론적으로 보고합니다.

컨텍스트

ara::crypto::cryp::HashFunctionCtx 클래스는 AUTOSAR Adaptive Platform의 crypto 모듈에서 암호화 해시값 및 체크섬 계산을 위한 인터페이스를 정의합니다. CryptoContext의 특수화로서 상태 비보존형 단일 호출 및 상태 보존형 스트리밍 방식을 위한 메서드를 제공합니다. 수명 주기 및 소유권 관리는 일반적으로 std::shared_ptr<HashFunctionCtx>(으)로 정의된 스마트 포인터 타입 별칭 Sptr([SWS_CRYPT_21101])을(를) 통해 수행됩니다.

주요 상호작용 파트너는 다음과 같습니다:

  • 호출 애플리케이션: 계산의 수명 주기를 제어하고 입력 데이터를 블록 단위로 또는 전체 메시지로 전달합니다.
  • 메모리 영역: 입력 데이터, 초기화 벡터(IV) 및 출력 및 상태 버퍼는 ReadOnlyMemRegion 및 ReadWriteMemRegion을(를) 통해 전송됩니다.
  • 키 객체: CryptoObject::Sptr을(를) 통해 암호화 키를 해시 계산의 데이터 소스로 직접 포함할 수 있습니다([SWS_CRYPT_50057]).
  • Crypto Provider: 해석: HashFunctionCtx의 인스턴스는 일반적으로 연관된 Crypto Provider를 통해 생성될 것으로 보입니다. 내보낸 컨텍스트 상태를 교환하려면 반드시 동일한 Crypto Provider와 동일한 알고리즘 ID가 전제되어야 합니다([SWS_CRYPT_50065]). 질문 Q-8365d4bee96bbf67 (열림)

수명 주기

HashFunctionCtx의 인스턴스는 스트리밍 처리 중에 여러 개별 상태를 거칩니다:

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()

상태 다이어그램: 초기화, 처리 및 완료 시 해시 컨텍스트의 상태 전이. 출처: [SWS_CRYPT_50152], [SWS_CRYPT_50153], [SWS_CRYPT_21113], [SWS_CRYPT_50058], [SWS_CRYPT_21115], [SWS_CRYPT_50064], [SWS_CRYPT_50065]

생성 후 컨텍스트는 시작되지 않은 상태에 있습니다. IV 없이 Start()([SWS_CRYPT_50152])을 호출하거나 초기화 벡터와 함께 Start(iv)([SWS_CRYPT_50153])를 호출하면 컨텍스트는 활성 처리 단계로 전환됩니다. 이미 실행 중인 계산은 새로운 시작 호출에 의해 암시적으로 폐기됩니다.

처리 상태에서는 원시 부분 데이터([SWS_CRYPT_21113]) 또는 키([SWS_CRYPT_50057])를 사용한 Update()의 반복 호출을 통해 입력 데이터가 누적됩니다. GetIntermediateDigest()을 통해 컨텍스트를 완료하거나 데이터 스트림을 중단하지 않고 중간 결과를 계산할 수 있습니다([SWS_CRYPT_50059]). 진행 중인 스트리밍 작업은 Cancel()를 통해 언제든지 중단할 수 있으며([SWS_CRYPT_50058]), 이를 통해 컨텍스트는 시작되지 않은 상태로 돌아갑니다.

Finish()을 호출하면 컨텍스트가 "완료됨" 상태([SWS_CRYPT_21115])로 전환됩니다. 이 상태에서만 결과 해시값을 GetDigest()([SWS_CRYPT_21116])를 통해 추출하거나 Compare()([SWS_CRYPT_50154])를 통해 기대값과 직접 비교 검증할 수 있습니다.

계산의 중단 및 추후 재개를 위해 필요한 버퍼 크기를 GetContextStateSize()([SWS_CRYPT_50063])을 통해 조회하고 내부 상태를 ExportContextState()([SWS_CRYPT_50064])를 통해 저장할 수 있습니다. 재개는 ImportContextState()([SWS_CRYPT_50065])를 통해 수행됩니다. 모든 인터페이스 메서드는 예외 안전(exception safe) 및 스레드 안전(thread-safe)으로 선언되어 있습니다.

사용 경로

이 클래스는 두 가지 처리 모드, 즉 직접 단일 단계 계산과 세그먼트화된 스트리밍 처리를 지원합니다.

단일 단계 계산은 CalculateHashDigest()([SWS_CRYPT_50060])을 통해 수행됩니다. 이때 입력 데이터, 선택적 IV 및 대상 메모리 영역이 전달되며 원자적 연산으로 해시값이 계산됩니다.

더 큰 데이터양이나 연속적인 데이터 스트림의 경우 스트리밍 경로가 사용됩니다:

해시값의 스트리밍 처리애플리케이션HashFunctionCtxStart()Result<void>loop각 데이터 블록에 대해Update(data)Result<void>Finish()Result<void>GetDigest(digest)Result<std::size_t>

시퀀스 다이어그램: Start, Update, Finish 및 GetDigest를 통한 스트리밍 계산의 일반적인 흐름. 출처: [SWS_CRYPT_50152], [SWS_CRYPT_21113], [SWS_CRYPT_21115], [SWS_CRYPT_21116]

  1. 용량 확인: GetDigestSize()([SWS_CRYPT_50061])을 통한 출력 크기 및 GetMaximumChunkSize()([SWS_CRYPT_50062])를 통한 최대 블록 크기 조회.
  2. 초기화: Start()([SWS_CRYPT_50152]) 또는 Start(iv)([SWS_CRYPT_50153]) 호출을 통한 컨텍스트 준비.
  3. 데이터 전달: Update(data)([SWS_CRYPT_21113])을 통한 데이터 블록 또는 Update(key)([SWS_CRYPT_50057])를 통한 키의 연속적인 전달.
  4. 완료 처리: Finish()([SWS_CRYPT_21115])을 통한 해시값 누적 종료.
  5. 결과 평가: GetDigest()([SWS_CRYPT_21116])을 사용한 계산된 해시값 읽기 또는 Compare()([SWS_CRYPT_50154])를 통한 참조값과의 인플레이스(in-place) 비교.

오류 시나리오

HashFunctionCtx의 메서드는 ara::core::Result을 통해 오류를 알리고 오류 발생 시 롤백 시맨틱을 보장합니다. 일반적인 오류 원인은 다음과 같습니다:

  • 순서 위반: 이전에 성공적인 Start() 호출 없이 Update()([SWS_CRYPT_21113], [SWS_CRYPT_50057]) 또는 Cancel()([SWS_CRYPT_50058])이 호출되면 CryptoErrc::kProcessingNotStarted이 반환됩니다. 사전 초기화 없이 Finish()([SWS_CRYPT_21115]) 또는 GetIntermediateDigest()([SWS_CRYPT_50059])가 호출되면 컨텍스트는 CryptoErrc::kInvalidUsageOrder을 보고합니다. Finish()을 실행하기 전에 GetDigest()([SWS_CRYPT_21116]) 또는 Compare()([SWS_CRYPT_50154])를 통해 결과를 검색하면 CryptoErrc::kProcessingNotFinished과 함께 실패합니다.
  • 버퍼 및 크기 문제: 출력 버퍼가 충분하지 않으면 CalculateHashDigest()([SWS_CRYPT_50060]), GetDigest()([SWS_CRYPT_21116]), GetIntermediateDigest()([SWS_CRYPT_50059]) 및 ExportContextState()([SWS_CRYPT_50064])은 CryptoErrc::kInsufficientCapacity 오류를 반환합니다. 지원되지 않는 입력 또는 IV 길이는 CalculateHashDigest(), Start(iv)([SWS_CRYPT_50153]) 및 Update()에서 CryptoErrc::kInvalidInputSize을 초래합니다.
  • 비호환성 및 기능 지원 누락: CryptoErrc::kUnsupported은 단일 호출이 지원되지 않거나([SWS_CRYPT_50060]), IV의 존재가 해시 함수와 일치하지 않거나([SWS_CRYPT_50152], [SWS_CRYPT_50153]), 중간 결과가 제공되지 않거나([SWS_CRYPT_50059]), 컨텍스트 내보내기/가져오기가 지원되지 않거나([SWS_CRYPT_50063], [SWS_CRYPT_50064], [SWS_CRYPT_50065]), 키 해싱이 허용되지 않음([SWS_CRYPT_50057])을 나타냅니다.
  • 객체 유효성 검사 및 권한: Update(key)을 통한 키 전달 시 호환되지 않는 키는 CryptoErrc::kIncompatibleObject을 유발하고 kAllowHashCalculation에 대한 릴리스 누락은 CryptoErrc::kUsageViolation([SWS_CRYPT_50057])을 유발합니다. ImportContextState()에서 유효하지 않은 버퍼 내용은 CryptoErrc::kInvalidArgument([SWS_CRYPT_50065])을 발생시킵니다.
  • 리소스 부족: 필요한 암호화 리소스가 사용 중인 경우 Start()은 이 시도에 대해 CryptoErrc::kBusyResource([SWS_CRYPT_50152], [SWS_CRYPT_50153])로 응답합니다.

이 가이드는 AUTOSAR Adaptive Platform R25-11 사양을 기반으로 합니다.

멤버 맵

클래스 다이어그램

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

상세 보기

개요에서 항목을 선택하세요.

메서드

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 함수

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 함수

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 함수

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 함수

Write the calculated hash digest into the provided output buffer.

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

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 함수 2

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

오버로드 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 함수 2

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

오버로드 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

타입 별칭

Sptr 타입 별칭

Smart pointer of the interface.

메서드 문서

함수 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 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: adb7aefb7feb 출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

CalculateHashDigest 메서드는 암호화 해시 값의 동기식 원샷(One-Shot) 계산을 수행하고 그 결과를 제공된 출력 버퍼에 씁니다[SWS_CRYPT_50060]. 매개변수로는 처리할 입력 메시지 data, 대상 버퍼 digest 및 선택적 초기화 벡터 iv가 전달됩니다. 성공적으로 실행되면 함수는 결과 객체 ara::core::Result<std::size_t>를 통해 실제로 기록된 다이제스트 바이트 수를 반환합니다[SWS_CRYPT_50060].

오류 처리

계산에 실패하면 인터페이스는 롤백 시맨틱을 보장합니다[SWS_CRYPT_50060]. 결과에는 다음 오류 코드가 포함될 수 있습니다:

  • ara::crypto::CryptoErrc::kInvalidInputSize: 전달된 데이터 또는 초기화 벡터의 크기가 지원되지 않습니다[SWS_CRYPT_50060].
  • ara::crypto::CryptoErrc::kUnsupported: 단일 호출 계산이 컨텍스트에서 지원되지 않거나, 초기화 벡터 전달이 컨텍스트 구성과 일치하지 않습니다(IV가 필요하지만 누락됨, 또는 지원되지 않는데 IV가 전달됨)[SWS_CRYPT_50060].
  • ara::crypto::CryptoErrc::kInsufficientCapacity: 출력 버퍼 digest의 용량이 계산된 다이제스트에 충분하지 않습니다[SWS_CRYPT_50060].

동시성 및 상호 작용

이 함수는 예외 안전(exception safe) 및 스레드 안전(thread-safe)으로 선언되어 있습니다[SWS_CRYPT_50060]. 유효하지 않은 입력 길이와 관련된 오류를 사전에 방지하기 위해 GetMaximumChunkSize를 통해 단일 호출에 허용되는 컨텍스트의 최대 버퍼 크기를 확인할 수 있습니다[SWS_CRYPT_50062].

이 사용 지침은 AUTOSAR 사양 R25-11을 바탕으로 자동 생성되었습니다.

구현자 가이드 준비 중 (복잡도 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#3d554c51
Content hash
3d554c51
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

함수 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 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 5c8d759c011a 출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

사용

메서드 Cancel()은 이전에 메서드 Start()을 통해 시작되었고 아직 정상적으로 완료되지 않은 진행 중인 스트리밍 연산을 명시적으로 취소하는 데 사용됩니다 [SWS_CRYPT_50058]. 호출은 헤더 파일 ara/crypto/cryp/hash_function_ctx.h의 ara::crypto::cryp::HashFunctionCtx 인스턴스에서 동기적 및 매개변수 없이 수행됩니다 [SWS_CRYPT_50058]. 성공적으로 수행되면 연산은 비어 있는 ara::core::Result<void>을 반환합니다 [SWS_CRYPT_50058].

오류 처리

실행 중 문제가 발생하면 반환된 ara::core::Result에 해당 오류 값이 포함됩니다 [SWS_CRYPT_50058]. Cancel() 호출 전에 Start()에 의해 처리가 시작되지 않았다면 취소는 실패하고 롤백 시맨틱과 함께 특정 오류 코드 ara::crypto::CryptoErrc::kProcessingNotStarted를 반환합니다 [SWS_CRYPT_50058].

동시성 및 제약사항

이 인터페이스는 thread-safe 및 exception safe(으)로 정의되며 noexcept(으)로 선언되어 있습니다 [SWS_CRYPT_50058]. 필수적인 기능적 사전 조건으로 데이터 처리가 이전의 Start() 호출에 의해 생성된 활성 상태에 있어야 합니다 [SWS_CRYPT_50058].

상호 작용

Cancel()에 의해 구현된 패턴은 암호화 스택의 다양한 스트리밍 컨텍스트 전반에 걸쳐 표준화되어 있습니다. 컨텍스트 VerifierPublicCtx [SWS_CRYPT_50023], MessageAuthnCodeCtx [SWS_CRYPT_50027], SignerPrivateCtx [SWS_CRYPT_50041], SymmetricCipherCtx [SWS_CRYPT_50046], DecryptorPrivateCtx [SWS_CRYPT_50069], AuthCipherCtx [SWS_CRYPT_50077] 및 EncryptorPublicCtx [SWS_CRYPT_50089] 또한 정확히 일치하는 시맨틱 및 오류 시그널링을 나타냅니다.

이 사용 지침은 AUTOSAR Adaptive R25-11 사양을 기반으로 합니다.

구현자 가이드 준비 중 (복잡도 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#966c0a03
Content hash
966c0a03
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

함수 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 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 1c3bf0837502 출처 열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

ara::crypto::cryp::HashFunctionCtx 클래스([SWS_CRYPT_50154])의 Compare 메서드는 사전에 계산된 해시 다이제스트의 크기와 내용을 예상 참조값과 동기식으로 비교합니다. 기준값은 ReadOnlyMemRegion 타입의 매개변수 expected을(를) 통해 전달됩니다. 성공 시 함수는 예상 바이트 시퀀스가 계산된 다이제스트와 일치할 때에만 true을(를) 포함하는 ara::core::Result<bool>을(를) 반환합니다.

호출의 전제 조건은 다이제스트 계산이 사전에 Finish() 메서드를 통해 완료되었을 것입니다. 그렇지 않은 경우 호출이 실패하고 롤백 시맨틱([SWS_CRYPT_50154])과 함께 ara::crypto::CryptoErrc::kProcessingNotFinished 오류를 반환합니다. 해석: expected의 길이가 다르거나 내용이 일치하지 않는 경우 오류 코드로 이어지는 것이 아니라 결과 객체에 일반적인 false이(가) 반환되는 것으로 추정됩니다. 질문 Q-fdd0ecaec22f6985 (열림)

동시성과 관련하여 이 메서드는 thread-safe 및 exception safe(으)로 명세되어 있습니다([SWS_CRYPT_50154]). noexcept(으)로 선언되어 있으므로 C++ 예외를 발생시키지 않습니다.

관련 암호화 컨텍스트에서도 동일한 검사 패턴이 사용됩니다: 메시지 인증 코드의 경우 ara::crypto::cryp::MessageAuthnCodeCtx::Compare([SWS_CRYPT_50133])이(가) 계산된 MAC 값의 크기와 내용을 비교하는 반면, CompareSubspan([SWS_CRYPT_50028])은(는) 최상위 비트를 검사합니다. 두 메서드 모두 사전에 완료된 계산을 동일하게 요구합니다.

이 텍스트는 AUTOSAR R25-11 사양을 바탕으로 AI에 의해 생성되었습니다.

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#1725494c
Content hash
1725494c
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

함수 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 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 78b3b1c67b6a 출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

ara::crypto::cryp::HashFunctionCtx 클래스의 [SWS_CRYPT_50064] 메서드는 해시 컨텍스트의 현재 상태를 ReadWriteMem Region 유형의 전달된 출력 버퍼 contextState에 동기식으로 씁니다. 이를 통해 애플리케이션은 진행 중인 암호화 해시 연산을 중단하고 나중에 다시 시작할 수 있습니다. 성공적으로 수행되면 호출은 비어 있는 ara::core::Result<void>를 반환합니다.

상호작용 및 버퍼 크기 산정

메모리 오류를 방지하려면 반드시 필요한 버퍼 크기(바이트 단위)를 [SWS_CRYPT_50063] 함수를 통해 사전에 쿼리해야 합니다. 내보낸 상태는 나중에 [SWS_CRYPT_50065]를 사용하여 해시 컨텍스트로 다시 가져올 수 있습니다. 이를 위한 전제 조건은 대상 컨텍스트가 원래 컨텍스트와 동일한 AlgorithmId를 가지며 동일한 Crypto Provider에 의해 제공되어야 한다는 점입니다. 가져올 때 기존의 연산 상태가 있는 경우 완전히 덮어씁니다.

오류 처리

연산이 실패하면 ara::core::Result에 오류가 반환됩니다. ara::crypto::CryptoErrc의 다음 오류 코드가 명세되어 있습니다:

  • ara::crypto::CryptoErrc::kUnsupported: 구체적인 컨텍스트가 상태 내보내기 또는 가져오기를 지원하지 않습니다.
  • ara::crypto::CryptoErrc::kInsufficientCapacity: 전달된 버퍼 contextState의 용량이 상태를 수용하기에 충분하지 않습니다.

두 오류 경우 모두에 롤백 시맨틱이 정의되어 있으므로 객체의 상태는 변경되지 않은 채로 유지됩니다.

동시성 및 실행 안전성

인터페이스는 const 및 noexcept로 선언되어 있습니다. 명세에 따르면 이 호출은 스레드 안전(thread-safe)이자 예외 안전(exception-safe)입니다.

이 사용 지침은 AUTOSAR 사양을 바탕으로 자동 생성되었습니다.

구현자 가이드 준비 중 (복잡도 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#675671c2
Content hash
675671c2
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

함수 Finish [SWS_CRYPT_21115] Upstream: RS_CRYPTO_02302, RS_CRYPTO_02205

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

Finish the digest calculation.

AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 3afea8abb39d 출처 열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

사용

동기식 메서드 Finish()은(는) ara::crypto::cryp::HashFunctionCtx에서 해시 값의 계산을 완료합니다 [SWS_CRYPT_21115]. 매개변수가 없는 이 호출은 성공적인 완료를 알리거나 오류를 캡슐화하는 ara::core::Result<void>을(를) 반환합니다 [SWS_CRYPT_21115]. 이 인터페이스는 noexcept(으)로 선언되어 있으며, 예외 안전(exception safe) 및 스레드 안전(thread-safe)으로 명시되어 있습니다 [SWS_CRYPT_21115].

오류 처리 및 동시성

호출 전에 해시 계산이 성공적으로 시작되지 않은 경우, 메서드는 ara::crypto::CryptoErrc::kInvalidUsageOrder 오류와 함께 실패합니다 [SWS_CRYPT_21115]. 이 오류 사례에 대해 롤백 시맨틱이 정의되어 있으므로, 호출자는 완료 전에 컨텍스트가 올바르게 시작되었는지 반드시 확인해야 합니다 [SWS_CRYPT_21115].

상호 작용

Finish()을(를) 성공적으로 호출한 후, 계산된 해시 다이제스트는 일반적으로 GetDigest()을(를) 사용하여 제공된 버퍼로 전송됩니다 [SWS_CRYPT_21116], [SWS_CRYPT_50059]. 구분하기 위한 용도로 GetIntermediateDigest()이(가) 사용됩니다. 이 함수는 Finish() 및 GetDigest()의 연속 호출과 동일한 해시 값을 제공하지만, 이후 추가 데이터를 전달할 수 있도록 허용합니다 [SWS_CRYPT_50059]. 해석: Finish()을(를) 호출한 후에는 계산이 최종적으로 완료되어 컨텍스트가 더 이상의 추가 데이터를 수락하지 않을 것으로 추정됩니다. 컨텍스트 내 처리 단계를 위해 허용되는 버퍼 크기는 GetMaximumChunkSize()을(를) 통해 조회할 수 있습니다 [SWS_CRYPT_50062]. 질문 Q-f4daf29364f45fd5 (열림)

이 사용 지침은 AUTOSAR 사양 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#e7046854
Content hash
e7046854
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

함수 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#2f17bb99
Content hash
2f17bb99
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

함수 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#baf7a9af
Content hash
baf7a9af
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

함수 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#90ad8997
Content hash
90ad8997
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

함수 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#7eae508f
Content hash
7eae508f
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

함수 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#6cf69939
Content hash
6cf69939
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

함수 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 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 16a68c3d97e9 출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

ara::crypto::cryp::HashFunctionCtx 클래스의 메서드 ImportContextState(ara/crypto/cryp/hash_function_ctx.h에 정의됨)은(는) 전달된 버퍼로부터 해시 컨텍스트의 내부 상태를 복원하여 이전에 중단된 해시 연산을 계속 진행하는 데 사용됩니다[SWS_CRYPT_50065]. 이때 현재 컨텍스트에서 실행 중이던 계산 상태는 가져온 상태로 완전히 대체됩니다[SWS_CRYPT_50065].

호출 및 전제 조건

동기 호출은 시그니처 ImportContextState(ReadOnlyMem Region contextState) noexcept을(를) 통해 수행되며 ara::core::Result<void>을(를) 반환합니다[SWS_CRYPT_50065]. 매개변수 contextState에는 다음과 같은 필수 전제 조건이 적용됩니다:

  • 데이터 버퍼는 사전에 메서드 ExportContextState()을(를) 사용하여 HashFunctionCtx의 인스턴스로부터 내보내졌어야 합니다[SWS_CRYPT_50065].
  • 소스 컨텍스트는 대상 컨텍스트와 동일한 AlgorithmId을(를) 보유했어야 하며 동일한 Crypto Provider에 의해 제공되었어야 합니다[SWS_CRYPT_50065].

오류 처리 및 동시성

오류 발생 시 롤백 시맨틱을 갖는 오류 코드가 반환되므로, 실패 시 컨텍스트의 기존 상태는 변경되지 않고 유지됩니다[SWS_CRYPT_50065]:

  • ara::crypto::CryptoErrc::kInvalidArgument: 인수 contextState에 유효하지 않은 데이터가 포함되어 있습니다[SWS_CRYPT_50065].
  • ara::crypto::CryptoErrc::kUnsupported: 특정 컨텍스트가 컨텍스트 상태의 내보내기 및 가져오기를 지원하지 않습니다[SWS_CRYPT_50065].

이 연산은 thread-safe 및 exception safe(으)로 명시되어 있습니다[SWS_CRYPT_50065].

이 사용 참고 사항은 AUTOSAR Adaptive 릴리스 R25-11 규격을 기반으로 합니다.

구현자 가이드 준비 중 (복잡도 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#83f09560
Content hash
83f09560
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

함수 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 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 6588b8251bb2 출처 열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

인터페이스 ara::crypto::cryp::HashFunctionCtx의 Start() 메서드는 초기화 벡터(IV) 없이 해시 값을 단계별로 계산하기 위한 컨텍스트를 초기화합니다 [SWS_CRYPT_50152]. 다시 호출하면 이미 진행 중인 해시 계산을 중단하고 새 계산을 위해 컨텍스트를 [SWS_CRYPT_50152](으)로 설정합니다.

이 함수는 동기식이며 매개변수를 받지 않고 ara::core::Result<void>을(를) 반환합니다 [SWS_CRYPT_50152]. 초기화 중 오류가 발생하면 다음과 같은 특정 오류 코드와 함께 롤백 시맨틱이 적용됩니다 [SWS_CRYPT_50152]:

  • ara::crypto::CryptoErrc::kUnsupported: 사용된 해시 함수가 초기화 벡터를 반드시 필요로 합니다 [SWS_CRYPT_50152].
  • ara::crypto::CryptoErrc::kBusyResource: 작업에 반드시 필요한 내부 리소스가 사용 중입니다 [SWS_CRYPT_50152].

동시성과 관련하여 이 메서드는 thread-safe 및 exception safe로 명시되어 있으며 noexcept(으)로 선언되어 있습니다 [SWS_CRYPT_50152]. 성공적으로 초기화된 후에는 컨텍스트의 Update() 메서드를 통해 메시지 부분을 순차적으로 공급할 수 있습니다 [SWS_CRYPT_21113]. 호출 시 진행 중인 계산을 중단하므로, 이 함수는 실제 환경에서 재시작 전 리셋 메커니즘으로도 기능할 것으로 추정됩니다. 질문 Q-9c369489a6c6e8cb (열림)

이 사용 지침은 R25-11용 AUTOSAR 사양을 기반으로 자동 생성되었습니다.

구현자 가이드 준비 중 (복잡도 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#339ee522
Content hash
339ee522
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

함수 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 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 3e6743c0173b 출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

사용

인터페이스 ara::crypto::cryp::HashFunctionCtx의 Start 함수는 초기화 벡터(IV)를 사용하여 해시 다이제스트를 계산하기 위한 컨텍스트를 초기화합니다 [SWS_CRYPT_50153]. 매개변수로 초기화 벡터 iv이(가) ReadOnlyMemRegion을(를) 통해 전달됩니다 [SWS_CRYPT_50153]. 동기 호출은 성공 시 반환값을 포함하지 않는 ara::core::Result<void>을(를) 반환합니다 [SWS_CRYPT_50153]. 또한 호출 시 이 컨텍스트에서 이미 진행 중일 수 있는 해시 계산을 중단합니다 [SWS_CRYPT_50153].

오류 처리

초기화 중 오류가 발생하면 해당 오류 코드가 반환되며, 모든 오류 사례에 대해 롤백 시맨틱이 보장됩니다 [SWS_CRYPT_50153]:

  • ara::crypto::CryptoErrc::kInvalidInputSize: 제공된 초기화 벡터의 크기가 지원되지 않습니다 [SWS_CRYPT_50153].
  • ara::crypto::CryptoErrc::kUnsupported: 기반이 되는 해시 함수가 초기화 벡터를 사용하지 않습니다 [SWS_CRYPT_50153].
  • ara::crypto::CryptoErrc::kBusyResource: 초기화에 필요한 리소스가 사용 중입니다 [SWS_CRYPT_50153].

동시성 및 상호 작용

이 인터페이스는 noexcept(으)로 선언되어 있으며 스레드 안전(thread-safe) 및 예외 안전(exception safe)으로 명시되어 있습니다 [SWS_CRYPT_50153]. 전형적인 흐름에서 이 호출은 Update 메서드를 통한 입력 메시지의 후속 단계별 처리를 위한 사전 조건이 됩니다 [SWS_CRYPT_21113].

이 사용 참고사항은 AUTOSAR 사양 R25-11을 바탕으로 자동 작성되었습니다.

구현자 가이드 준비 중 (복잡도 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#d9216849
Content hash
d9216849
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

함수 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 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: fe6681ce0628 출처 열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

[SWS_CRYPT_21113]에서 동기 메서드 Update은(는) 진행 중인 해시 계산 컨텍스트(ara::crypto::cryp::HashFunctionCtx)를 점진적으로 업데이트하는 데 사용됩니다. 매개변수 data(ReadOnlyMemRegion)을(를) 통해 처리할 입력 메시지의 일부가 전달됩니다. 이 함수는 성공 시 비어 있거나 해당 오류 코드를 캡슐화하는 ara::core::Result<void>을(를) 반환합니다.

오류 동작과 관련하여 이 메서드는 두 가지 특정 오류 상태에서 롤백 시맨틱을 제공합니다:

  • ara::crypto::CryptoErrc::kProcessingNotStarted: 계산이 사전에 Start() 메서드 호출을 통해 시작되지 않았습니다[SWS_CRYPT_21113].
  • ara::crypto::CryptoErrc::kInvalidInputSize: 전달된 데이터의 크기를 컨텍스트에서 지원하지 않습니다[SWS_CRYPT_21113].

호출 컨텍스트에는 명확한 순서 및 크기 조건이 적용됩니다. 데이터 전달 전에 해시 프로세스가 초기화되어 있어야 합니다[SWS_CRYPT_21113]. kInvalidInputSize을(를) 방지하기 위해 단일 Update 호출에 허용되는 최대 블록 크기를 GetMaximumChunkSize을(를) 통해 사전에 확인할 수 있습니다[SWS_CRYPT_50062]. 사양에 따르면 이 함수는 예외 안전(exception safe) 및 스레드 안전(thread-safe)(으)로 선언되어 있습니다[SWS_CRYPT_21113].

다른 인터페이스와의 상호 작용에서 HashFunctionCtx 내에는 Update(CryptoObject::Sptr) [SWS_CRYPT_50057]을(를) 통해 키 객체를 전달하기 위한 오버로드가 존재합니다. 모든 데이터 블록을 공급한 후 체크섬 완료는 Finish()을(를) 통해 수행될 것으로 보입니다[SWS_CRYPT_50062]. 질문 Q-dcac20f353ca55f4 (열림)

본 사용 지침은 명세를 기반으로 자동 생성되었습니다.

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#89e8de3d
Content hash
89e8de3d
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

함수 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 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 87fb2c080f4a 출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

동기 메서드 Update은(는) [SWS_CRYPT_50057]에서 ara::crypto::cryp::HashFunctionCtx의 해시값 계산 컨텍스트를 키 객체 형태의 새로운 메시지 섹션만큼 단계적으로 확장하는 데 사용됩니다. 매개변수로는 키 객체에 대한 스마트 포인터(CryptoObject::Sptr key)가 전달됩니다. 호출은 반환값으로 ara::core::Result<void>을(를) 제공하며, 이는 처리가 성공하면 비어 있고 오류 발생 시 해당 오류 코드를 캡슐화합니다[SWS_CRYPT_50057].

순서 조건으로 계산은 사전에 반드시 Start() 호출을 통해 시작되었어야 하며, 그렇지 않으면 오류 ProcessingNotStarted이(가) 보고됩니다[SWS_CRYPT_50057]. 추가적인 특정 오류 사례는 다음과 같습니다(각각 롤백 시맨틱 포함)[SWS_CRYPT_50057]:

  • 해시 컨텍스트가 키의 해싱을 일반적으로 지원하지 않는 경우 ara::crypto::CryptoErrc::kUnsupported,
  • 전달된 키 객체가 컨텍스트와 호환되지 않는 경우 ara::crypto::CryptoErrc::kIncompatibleObject,
  • 키의 허용된 용도에 kAllowHash Calculation이(가) 포함되지 않는 경우 ara::crypto::CryptoErrc::kUsageViolation,
  • 전달된 키의 데이터 크기가 지원되지 않는 경우 ara::crypto::CryptoErrc::kInvalidInputSize.

이 메서드는 thread-safe 및 exception safe(noexcept)(으)로 선언되어 있습니다[SWS_CRYPT_50057]. 모듈의 다른 인터페이스와의 상호 작용에서 개별 Update 호출에 허용되는 최대 버퍼 크기는 GetMaximumChunkSize()을(를) 통해 확인할 수 있습니다[SWS_CRYPT_50062]. 키 객체가 없는 일반 메시지 부분의 경우 HashFunctionCtx에 오버로드 Update(ReadOnlyMemRegion data)이(가) 병렬로 존재합니다[SWS_CRYPT_21113].

이 사용 지침은 사양을 바탕으로 자동 작성되었습니다.

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#fd484940
Content hash
fd484940
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

타입 별칭 문서

타입 별칭 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#808f798b
Content hash
808f798b
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