函数 Cancel [SWS_CRYPT_50023] 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() 中止之前由 Start() 发起且尚未完成的正在运行的流式操作 [SWS_CRYPT_50023]。它在头文件 ara/crypto/cryp/verifier_public_ctx.h 中被定义为上下文 ara::crypto::cryp::VerifierPublicCtx 的纯虚方法 [SWS_CRYPT_50023]。该调用同步进行且不带参数。返回值使用 ara::core::Result<void>,成功时该值为空,并确认操作已成功中止 [SWS_CRYPT_50023]。
错误处理
如果数据处理尚未通过调用方法 Start() 启动,则中止操作失败。在这种情况下,该函数在保证回滚语义的同时返回带有错误代码 ara::crypto::CryptoErrc::kProcessingNotStarted 的错误结果 [SWS_CRYPT_50023]。
并发性与限制
该规范将该方法标明为线程安全(thread-safe)和带有标识 noexcept 的异常安全(exception safe)[SWS_CRYPT_50023]。理解:成功中止后,上下文应该恢复到处理开始之前的初始状态,以便可以启动新的流式处理过程。 问题 Q-d80d09c8a8311bbc (未决)
crypt 模块内的协同工作
这种具有相同签名和错误处理的统一中止模式一致适用于模块 crypt 的所有流式上下文:
- 用于消息身份验证码的
MessageAuthnCodeCtx[SWS_CRYPT_50027], - 用于生成数字签名的
SignerPrivateCtx[SWS_CRYPT_50041], - 用于对称加密和解密的
SymmetricCipherCtx[SWS_CRYPT_50046], - 用于加密哈希操作的
HashFunctionCtx[SWS_CRYPT_50058], - 用于非对称解密的
DecryptorPrivateCtx[SWS_CRYPT_50069], - 用于经过身份验证的加密的
AuthCipherCtx[SWS_CRYPT_50077],以及 - 用于非对称加密的
EncryptorPublicCtx[SWS_CRYPT_50089]。
本使用说明基于 AUTOSAR 规范 R25-11 自动生成。
实现者指南即将推出(复杂度 I1)
| Header-Datei | #include "ara/crypto/cryp/verifier_public_ctx.h" |
|---|---|
| Scope | class ara::crypto::cryp::VerifierPublicCtx |
| 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_50023- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_CRYPT_50023@rel:R25-11#b7327b36- Content hash
b7327b36- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Cryptography.pdf#nameddest=SWS_CRYPT_50023
Status: valid/unmigrated
Version: rel:R25-11#ccbcbc55
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_50023@rel:R25-11#ccbcbc55
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 · 德文原文