הצפנה – מקבץ שרשורים

המודול הזה כולל פונקציות קריפטוגרפיות.

סיכום

ערכי דף

otCryptoSha256Hash typedef
מייצג גיבוב (hash) מסוג SHA-256.

פונקציות

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.

ערכי דף

otCryptoSha256Hash

otPlatCryptoSha256Hash otCryptoSha256Hash

מייצג גיבוב (hash) מסוג SHA-256.

פונקציות

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. אפשר לקרוא מידע נוסף או לתרום למסמכי התיעוד שלנו בדף מקורות מידע.