函数 Cancel [SWS_CRYPT_50041] 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.
方法 Cancel() 用于在类 ara::crypto::cryp::SignerPrivateCtx 内部同步中止正在进行且尚未完成的流式传输操作,该操作先前通过调用 Start() 启动 [SWS_CRYPT_50041]。纯虚接口 virtual ara::core::Result<void> Cancel() noexcept = 0; 在头文件 ara/crypto/cryp/signer_private_ctx.h 中声明,不接受任何传入参数,并通过空的 ara::core::Result<void> [SWS_CRYPT_50041] 指示成功中止。对于调用方而言,该方法被指定为异常安全的(exception safe)且并发线程安全的(thread-safe)[SWS_CRYPT_50041]。
关于调用顺序和错误处理,Cancel() 强制要求必须存在活动处理:如果此前未通过调用方法 Start() 启动数据处理,则中止将失败,并返回具有定义的回滚语义的错误代码 ara::crypto::CryptoErrc::kProcessingNotStarted [SWS_CRYPT_50041]。解释:在成功调用 Cancel() 之后,上下文推测会恢复到未启动的初始状态,以便可以开始新的签名或流过程。 问题 Q-348fb3ae43e424c9 (未决)
该设计遵循加密模块中所有流操作的统一原则。对于相关上下文,存在完全相同的签名和错误语义,如 VerifierPublicCtx [SWS_CRYPT_50023]、MessageAuthnCodeCtx [SWS_CRYPT_50027]、SymmetricCipherCtx [SWS_CRYPT_50046]、HashFunctionCtx [SWS_CRYPT_50058]、DecryptorPrivateCtx [SWS_CRYPT_50069]、AuthCipherCtx [SWS_CRYPT_50077] 以及 EncryptorPublicCtx [SWS_CRYPT_50089]。
本使用说明基于 AUTOSAR Adaptive 的规范要求自动生成。
实现者指南即将推出(复杂度 I1)
| Header-Datei | #include "ara/crypto/cryp/signer_private_ctx.h" |
|---|---|
| Scope | class ara::crypto::cryp::SignerPrivateCtx |
| 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_50041- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_CRYPT_50041@rel:R25-11#35ba4ad7- Content hash
35ba4ad7- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50041
Status: valid/unmigrated
Version: rel:R25-11#5f721a2b
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_50041@rel:R25-11#5f721a2b
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 · 德文原文