发送反馈
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
加密 - 线程堆栈
此模块包含加密功能。
摘要
函数
otCryptoAesCcm (const otCryptoKey *aKey, uint8_t aTagLength, const void *aNonce, uint8_t aNonceLength, const void *aHeader, uint32_t aHeaderLength, void *aPlainText, void *aCipherText, uint32_t aLength, bool aEncrypt, void *aTag)
void
执行 AES CCM 计算。
otCryptoHmacSha256 (const otCryptoKey *aKey, const uint8_t *aBuf, uint16_t aBufLength, otCryptoSha256Hash *aHash)
void
执行 HMAC 计算。
类型定义符
函数
otCryptoAesCcm
void otCryptoAesCcm(
const otCryptoKey *aKey,
uint8_t aTagLength,
const void *aNonce,
uint8_t aNonceLength,
const void *aHeader,
uint32_t aHeaderLength,
void *aPlainText,
void *aCipherText,
uint32_t aLength,
bool aEncrypt,
void *aTag
)
执行 AES CCM 计算。
具体说明
参数
[in] aKey
指向键的指针。
[in] aTagLength
标记的长度(以字节为单位)。
[in] aNonce
指向 Nonce 的指针。
[in] aNonceLength
Nonce 的长度(以字节为单位)。
[in] aHeader
指向标头的指针。
[in] aHeaderLength
标头的长度(以字节为单位)。
[in,out] aPlainText
指向明文的指针。
[in,out] aCipherText
指向密文的指针。
[in] aLength
明文长度(以字节为单位)。
[in] aEncrypt
true
表示加密,false
表示解密。
[out] aTag
指向代码的指针。
otCryptoHmacSha256
void otCryptoHmacSha256(
const otCryptoKey *aKey,
const uint8_t *aBuf,
uint16_t aBufLength,
otCryptoSha256Hash *aHash
)
执行 HMAC 计算。
具体说明
参数
[in] aKey
指向键的指针。
[in] aBuf
指向输入缓冲区的指针。
[in] aBufLength
aBuf
的长度(以字节为单位)。
[out] aHash
指向 otCryptoSha256Hash
结构的指针,用于输出哈希值。
资源
OpenThread API 参考文档源自 GitHub 上提供的源代码。如需了解详情,或者为我们的文档做贡献,请参阅资源 。
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates. The OPENTHREAD and related marks are trademarks of the Thread Group and are used under license.
最后更新时间 (UTC):2023-12-01。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"没有我需要的信息"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"太复杂/步骤太多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"内容需要更新"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/代码问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]
需要向我们提供更多信息?
{"lastModified": "\u6700\u540e\u66f4\u65b0\u65f6\u95f4 (UTC)\uff1a2023-12-01\u3002"}
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2023-12-01。"],[],[]]