Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ LOCAL_SRC_FILES := \
src/core/api/diags_api.cpp \
src/core/api/dns_api.cpp \
src/core/api/dns_server_api.cpp \
src/core/api/entropy_api.cpp \
src/core/api/error_api.cpp \
src/core/api/heap_api.cpp \
src/core/api/history_tracker_api.cpp \
Expand Down
1 change: 0 additions & 1 deletion doc/ot_api_doc.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@
*
* @defgroup api-cli Command Line Interface
* @defgroup api-crypto Crypto - Thread Stack
* @defgroup api-entropy Entropy Source
* @defgroup api-factory-diagnostics Factory Diagnostics - Thread Stack
* @defgroup api-heap Heap
* @defgroup api-history-tracker History Tracker
Expand Down
1 change: 0 additions & 1 deletion include/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ openthread_headers = \
openthread/dns.h \
openthread/dns_client.h \
openthread/dnssd_server.h \
openthread/entropy.h \
openthread/error.h \
openthread/heap.h \
openthread/history_tracker.h \
Expand Down
1 change: 0 additions & 1 deletion include/openthread/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ source_set("openthread") {
"dns.h",
"dns_client.h",
"dnssd_server.h",
"entropy.h",
"error.h",
"heap.h",
"history_tracker.h",
Expand Down
9 changes: 9 additions & 0 deletions include/openthread/coap.h
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,15 @@ otCoapType otCoapMessageGetType(const otMessage *aMessage);
*/
otCoapCode otCoapMessageGetCode(const otMessage *aMessage);

/**
* This function sets the Code value.
*
* @param[inout] aMessage A pointer to the CoAP message to initialize.
* @param[in] aCode CoAP message code.
*
*/
void otCoapMessageSetCode(otMessage *aMessage, otCoapCode aCode);

/**
* This method returns the CoAP Code as human readable string.
*
Expand Down
70 changes: 0 additions & 70 deletions include/openthread/entropy.h

This file was deleted.

2 changes: 1 addition & 1 deletion include/openthread/instance.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ extern "C" {
* @note This number versions both OpenThread platform and user APIs.
*
*/
#define OPENTHREAD_API_VERSION (186)
#define OPENTHREAD_API_VERSION (188)

/**
* @addtogroup api-instance
Expand Down
29 changes: 25 additions & 4 deletions include/openthread/platform/crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,8 @@ typedef struct otCryptoContext
/**
* Initialize the Crypto module.
*
* @retval OT_ERROR_NONE Successfully initialized Crypto module.
* @retval OT_ERROR_FAILED Failed to initialize Crypto module.
*
*/
otError otPlatCryptoInit(void);
void otPlatCryptoInit(void);

/**
* Import a key into PSA ITS.
Expand Down Expand Up @@ -469,6 +466,30 @@ otError otPlatCryptoSha256Update(otCryptoContext *aContext, const void *aBuf, ui
*/
otError otPlatCryptoSha256Finish(otCryptoContext *aContext, uint8_t *aHash, uint16_t aHashSize);

/**
* Initialize cryptographically-secure pseudorandom number generator (CSPRNG).
*
*/
void otPlatCryptoRandomInit(void);

/**
* Deinitialize cryptographically-secure pseudorandom number generator (CSPRNG).
*
*/
void otPlatCryptoRandomDeinit(void);

/**
* Fills a given buffer with cryptographically secure random bytes.
*
* @param[out] aBuffer A pointer to a buffer to fill with the random bytes.
* @param[in] aSize Size of buffer (number of bytes to fill).
*
* @retval OT_ERROR_NONE Successfully filled buffer with random values.
* @retval OT_ERROR_FAILED Operation failed.
*
*/
otError otPlatCryptoRandomGet(uint8_t *aBuffer, uint16_t aSize);

/**
* @}
*
Expand Down
7 changes: 0 additions & 7 deletions include/openthread/random_crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,6 @@ extern "C" {
*/
otError otRandomCryptoFillBuffer(uint8_t *aBuffer, uint16_t aSize);

/**
* This function returns initialized mbedtls_ctr_drbg_context.
*
* @returns A pointer to initialized mbedtls_ctr_drbg_context.
*/
mbedtls_ctr_drbg_context *otRandomCryptoMbedTlsContextGet(void);

/**
* @}
*
Expand Down
Loading