From 26e5b79db573ad0df6b02cead9487c14538a4fd7 Mon Sep 17 00:00:00 2001 From: Shen Mengjing Date: Wed, 28 Jan 2026 19:12:40 +0800 Subject: [PATCH] docs: Update CN translation for hmac.rst --- docs/en/api-reference/peripherals/hmac.rst | 4 ++-- docs/zh_CN/api-reference/peripherals/hmac.rst | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/en/api-reference/peripherals/hmac.rst b/docs/en/api-reference/peripherals/hmac.rst index 3597246c846..90e249406f5 100644 --- a/docs/en/api-reference/peripherals/hmac.rst +++ b/docs/en/api-reference/peripherals/hmac.rst @@ -71,7 +71,7 @@ Key purpose value: 8 In this case, the HMAC is given out to the software, e.g., to authenticate a message. -The API to calculate the HMAC is :cpp:func:`psa_mac_compute` with an opaque PSA key with the eFuse key block ID which contains the secret and has the efuse key purpose set to Upstream mode. +The API to calculate the HMAC is :cpp:func:`psa_mac_compute`, which takes an opaque PSA key referencing an eFuse key block that contains the secret and has its purpose set to Upstream mode. HMAC for Digital Signature ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -160,7 +160,7 @@ We use ``esp_efuse_write_key`` to set physical key block 4 in the eFuse for the // writing key failed, maybe written already } -Now we can use the saved key to calculate an HMAC for software usage using the PSA Crypto API. +Now we can calculate an HMAC for software usage with the saved key through the PSA Crypto API. .. code-block:: c diff --git a/docs/zh_CN/api-reference/peripherals/hmac.rst b/docs/zh_CN/api-reference/peripherals/hmac.rst index 692f89a8668..2c6a6c383e0 100644 --- a/docs/zh_CN/api-reference/peripherals/hmac.rst +++ b/docs/zh_CN/api-reference/peripherals/hmac.rst @@ -71,7 +71,7 @@ HMAC 支持软件使用 在此情况下,HMAC 支持软件使用,如验证消息真实性等。 -API :cpp:func:`psa_mac_compute` 用于计算 HMAC。输入参数包括消息、消息长度以及包含密钥的 eFuse 密钥块 ID,且该密钥块的 eFuse 密钥功能设置为上行模式。 +:cpp:func:`psa_mac_compute` 用于计算 HMAC,该函数接收一个不透明的 PSA 密钥,该密钥引用了包含密钥机密的 eFuse 密钥块,并且该密钥块的用途被设置为上行模式。 HMAC 用作数字签名 (DS) 的密钥 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -160,7 +160,7 @@ HMAC 的第三种应用场景是将其作为密钥,启用软禁用的 JTAG 接 // 密钥写入失败,可能已写入过 } -接下来可以使用已存储的密钥来计算 HMAC,供软件使用。 +接下来可以通过 PSA Crypto API,使用已存储的密钥来计算供软件使用的 HMAC。 .. code-block:: c