Crypto - กลุ่มเทรด

โมดูลนี้มีฟังก์ชันการเข้ารหัส

สรุป

Typedef

otCryptoSha256Hash typedef
แสดงแฮช 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

Typedef

otCryptoSha256Hash

otPlatCryptoSha256Hash otCryptoSha256Hash

แสดงแฮช 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
ตัวชี้ไปยังค่าที่ได้จากการสุ่ม
[in] aNonceLength
ความยาวของค่าที่ได้จากโหนดในหน่วยไบต์
[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 เพื่อเอาต์พุตค่าแฮช

แหล่งข้อมูล

หัวข้ออ้างอิง API ของ OpenThread จะมาจากซอร์สโค้ดซึ่งพร้อมใช้งานใน GitHub ดูข้อมูลเพิ่มเติมหรือมีส่วนร่วมในเอกสารประกอบของเราได้ที่แหล่งข้อมูล