DEENESPTFRRUARHIKOZHNL

클래스 ara::crypto::cryp::CryptoContext

[SWS_CRYPT_20400] Upstream: RS_CRYPTO_02008

class CryptoContext {...};

A common interface of a mutable cryptographic context, i.e. that is not binded to a single crypto object.

Header-Datei#include "ara/crypto/cryp/crypto_context.h"
Forwarding-Header#include "ara/crypto/crypto_fwd.h"
Scopenamespace ara::crypto::cryp

사용자 가이드AI 생성

알고리즘 ID의 스레드 안전한 조회를 위해 변경 가능한 암호화 컨텍스트에 대한 기본 인터페이스를 제공합니다.
AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 40f33685b357 출처 열린 질문 (2)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

알고리즘 ID의 스레드 안전한 조회를 위해 변경 가능한 암호화 컨텍스트에 대한 기본 인터페이스를 제공합니다.

이 인터페이스는 단일 암호화 객체에 고정 바인딩되지 않는 가변 암호화 컨텍스트를 위한 공통 기본 클래스 역할을 합니다. 순수 가상 메서드 GetAlgId()을(를) 통해 알고리즘 식별자를 ara::core::Result [SWS_CRYPT_20411](으)로 스레드 안전하게 조회할 수 있도록 합니다. 원치 않는 상태 복제를 방지하기 위해 복사 및 이동 연산은 완전히 금지됩니다 [SWS_CRYPT_41003]. 해제는 가상 기본 소멸자를 통해 결정론적이고 안전하게 수행됩니다.

컨텍스트

인터페이스 ara::crypto::cryp::CryptoContext은(는) AUTOSAR Adaptive Platform의 crypto 모듈 내에서 가변 암호화 컨텍스트(mutable cryptographic contexts)를 위한 기본 추상화를 정의합니다. 정적 암호화 객체와 달리 이러한 컨텍스트는 단일 암호화 객체에 고정적으로 바인딩되지 않습니다. 오히려 암호화 작업 실행 중에 내부 상태가 변경될 수 있는 다양한 암호화 처리 컨텍스트를 위한 공통 기본 클래스 역할을 합니다.

이 기본 인터페이스의 핵심 요소는 순수 가상 멤버 함수 GetAlgId()입니다. 이를 통해 상호작용 파트너는 컨텍스트에 현재 구성된 암호화 알고리즘의 식별자를 조회할 수 있습니다 [SWS_CRYPT_20411]. 해시, 서명 또는 암호화 서비스와 같은 구체적인 암호화 계산 및 변환 컨텍스트는 특정 알고리즘 기능을 제공하기 위해 시스템에서 CryptoContext로부터 파생될 것으로 보입니다. 질문 Q-203d40209cd355fa (열림)

수명 주기

CryptoContext의 수명 주기는 고유한 식별성과 엄격한 소유권 관계를 특징으로 합니다. 컴파일 시점에 제어되지 않는 복제 또는 일관성 없는 컨텍스트 상태 전송을 방지하기 위해 시맨틱 복사 작업은 완전히 금지됩니다. 복사 생성자 [SWS_CRYPT_41003] 및 복사 할당 연산자 [SWS_CRYPT_30214] 모두 명시적으로 삭제(=delete)된 것으로 선언되어 있습니다.

마찬가지로 인터페이스 정의는 컨텍스트의 이동을 금지합니다. 이동 생성자 [SWS_CRYPT_41004] 및 이동 할당 연산자 [SWS_CRYPT_30215] 모두 삭제되어 있습니다(=delete). 따라서 파생 클래스의 인스턴스는 원래 메모리 위치에 영구적으로 유지됩니다. 소멸 및 리소스 해제는 default 및 noexcept(으)로 정의된 가상 소멸자를 통해 결정론적으로 수행됩니다 [SWS_CRYPT_20401]. 이를 통해 파생 컨텍스트 객체를 기본 인터페이스에 대한 포인터를 통해 리소스 누수 없이 안전하게 해제할 수 있습니다.

동시성과 관련하여 GetAlgId()에 대한 요구사항은 명시적으로 스레드 안전성을 지정합니다 [SWS_CRYPT_20411]. 따라서 여러 스레드가 외부 동기화 없이 동일한 컨텍스트의 알고리즘 식별자를 동시에 읽을 수 있습니다.

사용 경로

CryptoContext은(는) 순수 가상 인터페이스이므로 애플리케이션 개발자는 직접 인스턴스를 생성할 수 없습니다. 특화된 컨텍스트 클래스의 인스턴스는 일반적으로 암호화 스택의 팩토리 함수 또는 공급자 컴포넌트를 통해 인스턴스화되어 포인터나 참조를 통해 호출자에게 제공될 것으로 보입니다. 질문 Q-728a7b6dd526eb64 (열림) 기본 인터페이스 수준에서의 일반적인 사용 흐름은 다음 단계로 구성됩니다:

  • 제공: 호출자가 암호화 공급자로부터 구성된 컨텍스트에 대한 참조 또는 포인터를 수신합니다.
  • 알고리즘 검사: GetAlgId() 호출을 통해 알고리즘 식별자를 조회하고 평가하여 [SWS_CRYPT_20411] 컨텍스트가 요구된 사양을 충족하는지 확인합니다.
  • 작업 및 정리: 파생 인터페이스를 통해 알고리즘별 작업을 수행한 후, 가상 소멸자를 통해 컨텍스트가 자동으로 해제됩니다 [SWS_CRYPT_20401].

오류 시나리오

CryptoContext의 오류 처리 개념은 AUTOSAR Adaptive Platform의 일반적인 안전 장애(fail-safe) 설계를 따르며 C++ 예외를 사용하지 않습니다. 메서드 GetAlgId()은(는) 예외 안전(exception safe)(으)로 지정되어 있으며 결과를 ara::core::Result<ara::crypto::AlgIdString> 안에 반환합니다 [SWS_CRYPT_20411]. 알고리즘 ID를 결정하는 동안 오류가 발생하는 경우 이는 Result 객체의 오류 채널을 통해 전달됩니다.

사양에 따르면 GetAlgId()은(는) 표준화된 오류 코드를 정의하지 않습니다 [SWS_CRYPT_20411]. 따라서 호출자는 알고리즘 ID 문자열에 접근하기 전에 주로 Result에 유효한 값이 포함되어 있는지 확인해야 합니다. 객체를 해체할 때 noexcept(으)로 선언된 가상 소멸자는 소멸 중에 예외가 전파되지 않고 정리가 항상 안정적으로 완료되도록 보장합니다 [SWS_CRYPT_20401].

이 가이드는 AUTOSAR Adaptive 사양 R25-11을 기반으로 하며 AI 큐레이션 어시스턴트에 의해 생성되었습니다.

멤버 맵

생성자 및 소멸자

2

메서드

1

연산자

1

클래스 다이어그램

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

G nara__crypto__cryp__CryptoContext85 CryptoContext + CryptoContext() + operator=() + ~CryptoContext() + GetAlgId() nara__crypto__cryp__AuthCipherCtx142 AuthCipherCtx nara__crypto__cryp__AuthCipherCtx142->nara__crypto__cryp__CryptoContext85 nara__crypto__cryp__DecryptorPrivateCtx616 DecryptorPrivateCtx nara__crypto__cryp__DecryptorPrivateCtx616->nara__crypto__cryp__CryptoContext85 nara__crypto__cryp__EncryptorPublicCtx829 EncryptorPublicCtx nara__crypto__cryp__EncryptorPublicCtx829->nara__crypto__cryp__CryptoContext85 nara__crypto__cryp__HashFunctionCtx412 HashFunctionCtx nara__crypto__cryp__HashFunctionCtx412->nara__crypto__cryp__CryptoContext85 nara__crypto__cryp__KeyAgreementPrivateCtx203 KeyAgreementPrivateCtx nara__crypto__cryp__KeyAgreementPrivateCtx203->nara__crypto__cryp__CryptoContext85 nara__crypto__cryp__KeyDecapsulatorPrivateCtx748 KeyDecapsulatorPrivateCtx nara__crypto__cryp__KeyDecapsulatorPrivateCtx748->nara__crypto__cryp__CryptoContext85 nara__crypto__cryp__KeyDerivationFunctionCtx485 KeyDerivationFunctionCtx nara__crypto__cryp__KeyDerivationFunctionCtx485->nara__crypto__cryp__CryptoContext85 nara__crypto__cryp__KeyEncapsulatorPublicCtx699 KeyEncapsulatorPublicCtx nara__crypto__cryp__KeyEncapsulatorPublicCtx699->nara__crypto__cryp__CryptoContext85 nara__crypto__cryp__MessageAuthnCodeCtx845 MessageAuthnCodeCtx nara__crypto__cryp__MessageAuthnCodeCtx845->nara__crypto__cryp__CryptoContext85 nara__crypto__cryp__ProtectedKeyImportCtx279 ProtectedKeyImportCtx nara__crypto__cryp__ProtectedKeyImportCtx279->nara__crypto__cryp__CryptoContext85 nara__crypto__cryp__RandomGeneratorCtx512 RandomGeneratorCtx nara__crypto__cryp__RandomGeneratorCtx512->nara__crypto__cryp__CryptoContext85 nara__crypto__cryp__SignerPrivateCtx943 SignerPrivateCtx nara__crypto__cryp__SignerPrivateCtx943->nara__crypto__cryp__CryptoContext85 nara__crypto__cryp__SymmetricCipherCtx167 SymmetricCipherCtx nara__crypto__cryp__SymmetricCipherCtx167->nara__crypto__cryp__CryptoContext85 nara__crypto__cryp__SymmetricKeyWrapperCtx465 SymmetricKeyWrapperCtx nara__crypto__cryp__SymmetricKeyWrapperCtx465->nara__crypto__cryp__CryptoContext85 nara__crypto__cryp__VerifierPublicCtx35 VerifierPublicCtx nara__crypto__cryp__VerifierPublicCtx35->nara__crypto__cryp__CryptoContext85

상세 보기

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

생성자 및 소멸자

CryptoContext 함수 2

Copy-Constructor.

오버로드 CryptoContext 2
CryptoContext (const CryptoContext &)=delete; SWS_CRYPT_41003
CryptoContext (CryptoContext &&)=delete; SWS_CRYPT_41004

Destructor.

virtual ~CryptoContext () noexcept=default;

메서드

GetAlgId 함수

The interface shall return the AlgId of the context.

virtual ara::core::Result< ara::crypto::AlgIdString > GetAlgId () const noexcept=0;

연산자

operator= 함수 2

Copy-assign another CryptoContext to this instance.

오버로드 = 2
CryptoContext & operator= (const CryptoContext &other)=delete; SWS_CRYPT_30214
CryptoContext & operator= (CryptoContext &&other)=delete; SWS_CRYPT_30215

메서드 문서

함수 CryptoContext [SWS_CRYPT_41003] Upstream: RS_CRYPTO_02004

CryptoContext (const CryptoContext &)=delete;

Copy-Constructor.

Header-Datei#include "ara/crypto/cryp/crypto_context.h"
Scopeclass ara::crypto::cryp::CryptoContext

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

Record
AUTOSAR/AP/record/SWS_CRYPT_41003
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_41003@rel:R25-11#43071193
Content hash
43071193
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_41003
Status: valid/unmigrated Version: rel:R25-11#98ee9054 Versionshistorie & Revisions (1 transition, 4 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_41003@rel:R25-11#98ee9054
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#8cdfc0542026-09-30
  • R23-11rel:R23-11#24b116da2026-10-14
  • R24-11rel:R24-11#98ee90542026-10-14
  • R25-11rel:R25-11#98ee90542026-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

함수 CryptoContext [SWS_CRYPT_41004] Upstream: RS_CRYPTO_02004

CryptoContext (CryptoContext &&)=delete;

Move-Constructor.

Header-Datei#include "ara/crypto/cryp/crypto_context.h"
Scopeclass ara::crypto::cryp::CryptoContext

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

Record
AUTOSAR/AP/record/SWS_CRYPT_41004
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_41004@rel:R25-11#dd5a5050
Content hash
dd5a5050
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_41004
Status: valid/unmigrated Version: rel:R25-11#62d2964c Versionshistorie & Revisions (1 transition, 4 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_41004@rel:R25-11#62d2964c
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#e84c8c582026-09-30
  • R23-11rel:R23-11#d9afa7b72026-10-14
  • R24-11rel:R24-11#62d2964c2026-10-14
  • R25-11rel:R25-11#62d2964c2026-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

함수 GetAlgId [SWS_CRYPT_20411] Upstream: RS_CRYPTO_02008

virtual ara::core::Result< ara::crypto::AlgIdString > GetAlgId () const noexcept=0;

The interface shall return the AlgId of the context.

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

Rückgabewert

TypBeschreibung
ara::core::Result<ara::crypto::AlgIdString >the AlgId of the context 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_20411
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20411@rel:R25-11#12569255
Content hash
12569255
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20411
Status: valid/unmigrated Version: rel:R25-11#268ba62b 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_20411@rel:R25-11#268ba62b
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#0505bc8c2026-09-30
  • R19-11rel:R19-11#44b1ac7b2026-10-14
  • R20-11rel:R20-11#1bdef3fa2026-10-14
  • R21-11rel:R21-11#1bdef3fa2026-10-14
  • R22-11rel:R22-11#5dd94a472026-10-14
  • R23-11rel:R23-11#3ac9359d2026-10-14
  • R24-11rel:R24-11#d2d6ca2d2026-10-14
  • R25-11rel:R25-11#268ba62b2026-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

함수 operator= [SWS_CRYPT_30214] Upstream: RS_CRYPTO_02004

CryptoContext & operator= (const CryptoContext &other)=delete;

Copy-assign another CryptoContext to this instance.

Header-Datei#include "ara/crypto/cryp/crypto_context.h"
Scopeclass ara::crypto::cryp::CryptoContext

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

Record
AUTOSAR/AP/record/SWS_CRYPT_30214
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_30214@rel:R25-11#24f857c5
Content hash
24f857c5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_30214
Status: valid/unmigrated Version: rel:R25-11#54e94bf7 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_30214@rel:R25-11#54e94bf7
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#7667e7772026-09-30
  • R20-11rel:R20-11#8da104e32026-10-14
  • R21-11rel:R21-11#78cc10a82026-10-14
  • R22-11rel:R22-11#760b4ede2026-10-14
  • R23-11rel:R23-11#8fd55e4c2026-10-14
  • R24-11rel:R24-11#54e94bf72026-10-14
  • R25-11rel:R25-11#54e94bf72026-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

함수 operator= [SWS_CRYPT_30215] Upstream: RS_CRYPTO_02004

CryptoContext & operator= (CryptoContext &&other)=delete;

Move-assign another CryptoContext to this instance.

Header-Datei#include "ara/crypto/cryp/crypto_context.h"
Scopeclass ara::crypto::cryp::CryptoContext

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

Record
AUTOSAR/AP/record/SWS_CRYPT_30215
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_30215@rel:R25-11#46ddaac0
Content hash
46ddaac0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_30215
Status: valid/unmigrated Version: rel:R25-11#f0c7c4e1 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_30215@rel:R25-11#f0c7c4e1
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#e0e202f42026-09-30
  • R20-11rel:R20-11#17d0c85f2026-10-14
  • R21-11rel:R21-11#17d0c85f2026-10-14
  • R22-11rel:R22-11#843bd59e2026-10-14
  • R23-11rel:R23-11#50f4cde12026-10-14
  • R24-11rel:R24-11#f0c7c4e12026-10-14
  • R25-11rel:R25-11#f0c7c4e12026-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

함수 ~CryptoContext [SWS_CRYPT_20401] Upstream: RS_CRYPTO_02008

virtual ~CryptoContext () noexcept=default;

Destructor.

Header-Datei#include "ara/crypto/cryp/crypto_context.h"
Scopeclass ara::crypto::cryp::CryptoContext
Exception-Sicherheitexception safe

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

Record
AUTOSAR/AP/record/SWS_CRYPT_20401
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CRYPT_20401@rel:R25-11#0e2ca649
Content hash
0e2ca649
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_20401
Status: valid/unmigrated Version: rel:R25-11#0d1ace43 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_20401@rel:R25-11#0d1ace43
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#a3a37bef2026-09-30
  • R20-11rel:R20-11#0a163ac42026-10-14
  • R21-11rel:R21-11#5ba66c7c2026-10-14
  • R22-11rel:R22-11#91bc35ba2026-10-14
  • R23-11rel:R23-11#40c1b8e32026-10-14
  • R24-11rel:R24-11#66216e1d2026-10-14
  • R25-11rel:R25-11#0d1ace432026-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