함수 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.
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" |
|---|---|
| Scope | class ara::crypto::cryp::HashFunctionCtx |
| Exception-Sicherheit | exception safe |
| Thread-Sicherheit | thread-safe |
Parameter (in)
| Parameter | Beschreibung |
|---|---|
| data | the input message that should be processed |
| iv | an optional initialization vector |
Parameter (out)
| Parameter | Beschreibung |
|---|---|
| digest | an output data buffer that the digest will be written into. |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| ara::core::Result<std::size_t > | A result containing the size in bytes of the digest or an error. |
Fehler
| Fehlercode | Beschreibung |
|---|---|
| ara::crypto::CryptoErrc::kInvalidInputSize | rollback_semantics if the size of provided data or IV is not supported |
| ara::crypto::CryptoErrc::kUnsupported | rollback_semantics if single-call operation is not supported, or if the context requires setting an IV but no IV is provided, or if the context does not support setting an IV but an IV is provided |
| ara::crypto::CryptoErrc::kInsufficientCapacity | rollback_semantics if the output buffer is too small |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_CRYPT_50060- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_CRYPT_50060@rel:R25-11#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
Requirement Text as-of this release:
Curation Decisions:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
|---|---|---|---|---|
| 2026-08-13 | tool | none → valid/unmigrated | mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record | 2026-08-13-status-backfill |
gemini-3.8-flash-low· 2026-10-13 · 독일어 원문