함수 Encapsulate [SWS_CRYPT_21813] Upstream: RS_CRYPTO_02102, RS_CRYPTO_02108, RS_CRYPTO_02115
virtual ara::core::Result< std::size_t > Encapsulate (Symmetric Key::Sptr key, ReadWriteMemRegion encapsulatedKey) const noexcept=0;
Encapsulate the provided symmetric key.
동기식 메서드 Encapsulate은(는) 전달된 대칭 키(key)를 캡슐화하고 그 결과를 출력 버퍼 encapsulatedKey에 기록합니다 [SWS_CRYPT_21813]. 성공적으로 실행되면 ara::core::Result<std::size_t>을(를) 통해 캡슐화된 키의 바이트 크기를 반환합니다 [SWS_CRYPT_21813].
오류 발생 시 롤백 시맨틱과 함께 해당 오류 코드가 반환됩니다 [SWS_CRYPT_21813]. 관련 오류 원인은 다음과 같습니다:
UninitializedContext: 컨텍스트가 공개 키 값으로 초기화되지 않았습니다 [SWS_CRYPT_21813].ara::crypto::CryptoErrc::kUsageViolation: 캡슐화 키에 용도 플래그kAllowKeyWrapping이(가) 없거나, 캡슐화할 키에kAllowSecuredExport이(가) 누락되었습니다 [SWS_CRYPT_21813].ara::crypto::CryptoErrc::kIncompatibleObject또는CryptoErrc::kInvalidInputSize: 키 객체가 호환되지 않거나 컨텍스트에서 키 크기를 지원하지 않습니다 [SWS_CRYPT_21813].CryptoErrc::kUnsupported: 컨텍스트가 캡슐화 중에 직접 키를 생성하므로 제공된 키의 캡슐화를 지원하지 않습니다 [SWS_CRYPT_21813].ara::crypto::CryptoErrc::kInsufficientCapacity: 버퍼encapsulatedKey의 크기가 너무 작습니다 [SWS_CRYPT_21813].ara::crypto::CryptoErrc::kBusyResource또는ara::crypto::CryptoErrc::kEmptyKeySlot: 리소스가 사용 중이거나 구성된 KeySlot이 비어 있습니다 [SWS_CRYPT_21813].
이 작업은 const, noexcept(으)로 선언되어 있으며 thread-safe 및 exception safe로 명시되어 있습니다 [SWS_CRYPT_21813].
모듈과의 상호 작용 측면에서 이 함수는 기존 키를 받지 않고 대칭 키를 동적으로 새로 생성하여 캡슐화 결과와 함께 반환하는 대체 오버로드 [SWS_CRYPT_50011]과(와) 구별됩니다 [SWS_CRYPT_50011].
AUTOSAR R25-11을 기반으로 자동 생성된 사용 지침.
| Header-Datei | #include "ara/crypto/cryp/key_encapsulator_public_ctx.h" |
|---|---|
| Scope | class ara::crypto::cryp::KeyEncapsulatorPublicCtx |
| Exception-Sicherheit | exception safe |
| Thread-Sicherheit | thread-safe CryptoErrc::k rollback_semantics |
Parameter (in)
| Parameter | Beschreibung |
|---|---|
| key | the symmetric key to be encapsulated |
Parameter (out)
| Parameter | Beschreibung |
|---|---|
| encapsulatedKey | an output buffer the encapsulated key is written to |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| ara::core::Result<std::size_t > | a result containing the size of the encapsulated key or an error |
Fehler
| Fehlercode | Beschreibung |
|---|---|
| UninitializedContext | if the context was not initialized by a public key value |
| ara::crypto::CryptoErrc::kUsageViolation | rollback_semantics if the allowed usage of the encapsulation key does not include k AllowKeyWrapping or if the allowed usage of the encapsulated key does not include kAllowSecuredExport |
| ara::crypto::CryptoErrc::kIncompatibleObject | rollback_semantics if the provided encapsulated key object is incompatible with this context |
| CryptoErrc::kInvalidInputSize | rollback_semantics if this context does not support the size of the encapsulated key |
| CryptoErrc::kUnsupported | rollback_semantics if this context does not support setting the encapsulated key, because it generates the key during encapsulation |
| ara::crypto::CryptoErrc::kInsufficientCapacity | rollback_semantics if the output buffer is too small |
| ara::crypto::CryptoErrc::kBusyResource | rollback_semantics a required resource is busy |
| ara::crypto::CryptoErrc::kEmptyKeySlot | rollback_semantics if a KeySlot was configured that is currently is empty |
| ara::crypto::CryptoErrc::kUsageViolation | rollback_semantics if the allowed usage of the key does not include kAllowKeyWrapping |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_CRYPT_21813- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_CRYPT_21813@rel:R25-11#377262b3- Content hash
377262b3- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_21813
Status: valid/unmigrated
Version: rel:R25-11#5f08acc8
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_21813@rel:R25-11#5f08acc8
Recorded Revisions (8):
- R25-11
rel:R25-11#b3c8ad102026-09-30 - R19-11
rel:R19-11#5df6f2a12026-10-14 - R20-11
rel:R20-11#bc53d66f2026-10-14 - R21-11
rel:R21-11#a093fad52026-10-14 - R22-11
rel:R22-11#9a52ca012026-10-14 - R23-11
rel:R23-11#dadd77c62026-10-14 - R24-11
rel:R24-11#2cf84d842026-10-14 - R25-11
rel:R25-11#5f08acc82026-10-14 active
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 · 독일어 원문