الترميز - حزمة سلاسل المحادثات
تشمل هذه الوحدة دوال ترميز.
الملخّص
مواقد الخط |
|
---|---|
otCryptoSha256Hash
|
مَعلمة typetypestruct otCryptoSha256Hash
وتمثل هذه البنية تجزئة SHA-256. |
المتغيرات |
|
---|---|
OT_TOOL_PACKED_END
|
الدوال |
|
---|---|
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.
|
otCryptoEcdsaSign(uint8_t *aOutput, uint16_t *aOutputLength, const uint8_t *aInputHash, uint16_t aInputHashLength, const uint8_t *aPrivateKey, uint16_t aPrivateKeyLength)
|
تؤدي هذه الطريقة إلى إنشاء علامة ECDSA.
|
otCryptoHmacSha256(const otCryptoKey *aKey, const uint8_t *aBuf, uint16_t aBufLength, otCryptoSha256Hash *aHash)
|
void
تنفّذ هذه الدالة حساب HMAC.
|
التشريعات |
|
---|---|
otCryptoSha256Hash |
وتمثل هذه البنية تجزئة SHA-256. |
مواقد الخط
المتغيرات
OT_Tool_PACKED_END
OT_TOOL_PACKED_BEGIN struct otCryptoSha256Hash OT_TOOL_PACKED_END
الدوال
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.
التفاصيل | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
المعلَمات |
|
otCryptoEcdsaSign
otError otCryptoEcdsaSign( uint8_t *aOutput, uint16_t *aOutputLength, const uint8_t *aInputHash, uint16_t aInputHashLength, const uint8_t *aPrivateKey, uint16_t aPrivateKeyLength )
تؤدي هذه الطريقة إلى إنشاء علامة ECDSA.
التفاصيل | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
المعلَمات |
|
||||||||||||
قيم الإرجاع |
|
otCryptoHmacSha256
void otCryptoHmacSha256( const otCryptoKey *aKey, const uint8_t *aBuf, uint16_t aBufLength, otCryptoSha256Hash *aHash )
تنفّذ هذه الدالة حساب HMAC.
التفاصيل | |||||||||
---|---|---|---|---|---|---|---|---|---|
المعلَمات |
|
وحدات ماكرو
OT_CRYPTO_SHA256_HASH_SIZE
OT_CRYPTO_SHA256_HASH_SIZE 32
طول تجزئة SHA256 (بالبايت).
المراجع
تنشأ مواضيع واجهة برمجة التطبيقات المرجعية لـ OpenThread من رمز المصدر، المتوفر على GitHub. للاطّلاع على مزيد من المعلومات أو للمساهمة في مستنداتنا، يُرجى الرجوع إلى المراجع.