函数 Cancel [SWS_CRYPT_50069] 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.
在 ara/crypto/cryp/decryptor_private_ctx.h 中定义的类 ara::crypto::cryp::DecryptorPrivateCtx 的方法 Cancel 中止正在运行的流操作,该操作先前通过 Start() 启动且尚未完成 [SWS_CRYPT_50069]。该调用不接收任何传入参数,并返回 ara::core::Result<void> 作为返回值 [SWS_CRYPT_50069]。如果中止流处理成功,则该对象包含一个空 Result;否则它传递发生的错误 [SWS_CRYPT_50069]。该纯虚接口声明为 noexcept,具有完全的异常安全性,并被指明为并发访问线程安全 [SWS_CRYPT_50069]。
在错误处理和前置条件方面必须注意严格的顺序:如果此前未通过调用方法 Start() 启动数据处理,则操作失败并返回具有回滚语义的特定错误码 ara::crypto::CryptoErrc::kProcessingNotStarted [SWS_CRYPT_50069]。因此调用方必须确保在中止之前已存在活动操作,以避免这种错误状态 [SWS_CRYPT_50069]。
在与 crypt 的整个模块架构的交互中,Cancel 遵循用于有状态流式处理过程的标准化设计模式。相关的加密上下文 ara::crypto::cryp::VerifierPublicCtx [SWS_CRYPT_50023]、ara::crypto::cryp::MessageAuthnCodeCtx [SWS_CRYPT_50027]、ara::crypto::cryp::SignerPrivateCtx [SWS_CRYPT_50041]、ara::crypto::cryp::SymmetricCipherCtx [SWS_CRYPT_50046]、ara::crypto::cryp::HashFunctionCtx [SWS_CRYPT_50058]、ara::crypto::cryp::AuthCipherCtx [SWS_CRYPT_50077] 以及 ara::crypto::cryp::EncryptorPublicCtx [SWS_CRYPT_50089] 共享相同的签名、返回语义和错误处理。
本使用说明基于 AUTOSAR 规范 R25-11 自动生成。
实现者指南即将推出(复杂度 I1)
| Header-Datei | #include "ara/crypto/cryp/decryptor_private_ctx.h" |
|---|---|
| Scope | class ara::crypto::cryp::DecryptorPrivateCtx |
| Exception-Sicherheit | exception safe |
| Thread-Sicherheit | thread-safe |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| ara::core::Result< void > | an empty result if the ongoing streaming operation was cancelled successfully, or a result containing an error |
Fehler
| Fehlercode | Beschreibung |
|---|---|
| ara::crypto::CryptoErrc::kProcessingNotStarted | rollback_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_50069- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_CRYPT_50069@rel:R25-11#2e537a87- Content hash
2e537a87- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50069
Status: valid/unmigrated
Version: rel:R25-11#2a0972af
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_50069@rel:R25-11#2a0972af
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 · 德文原文