|
TuyaOS
|
Common process - adapter the hash api provide by OS 更多...
#include "tuya_cloud_types.h"
类型定义 | |
| typedef VOID_T * | TKL_HASH_HANDLE |
函数 | |
| OPERATE_RET | tkl_md5_create_init (TKL_HASH_HANDLE *ctx) |
| This function Create&initializes a md5 context. 更多... | |
| OPERATE_RET | tkl_md5_finish_ret (TKL_HASH_HANDLE ctx, UINT8_T output[16]) |
| This function finishes the md5 operation, and writes the result to the output buffer. 更多... | |
| OPERATE_RET | tkl_md5_free (TKL_HASH_HANDLE ctx) |
| This function clears a md5 context. 更多... | |
| OPERATE_RET | tkl_md5_starts_ret (TKL_HASH_HANDLE ctx) |
| This function starts a md5 checksum calculation. 更多... | |
| OPERATE_RET | tkl_md5_update_ret (TKL_HASH_HANDLE ctx, const UINT8_T *input, size_t ilen) |
| This function feeds an input buffer into an ongoing md5 checksum calculation. 更多... | |
| OPERATE_RET | tkl_sha1_create_init (TKL_HASH_HANDLE *ctx) |
| This function Create&initializes a sha1 context. 更多... | |
| OPERATE_RET | tkl_sha1_finish_ret (TKL_HASH_HANDLE ctx, UINT8_T output[20]) |
| This function finishes the sha1 operation, and writes the result to the output buffer. 更多... | |
| OPERATE_RET | tkl_sha1_free (TKL_HASH_HANDLE ctx) |
| This function clears a sha1 context. 更多... | |
| OPERATE_RET | tkl_sha1_starts_ret (TKL_HASH_HANDLE ctx) |
| This function starts a sha224 or sha1 checksum calculation. 更多... | |
| OPERATE_RET | tkl_sha1_update_ret (TKL_HASH_HANDLE ctx, const UINT8_T *input, size_t ilen) |
| This function feeds an input buffer into an ongoing sha1 checksum calculation. 更多... | |
| OPERATE_RET | tkl_sha256_create_init (TKL_HASH_HANDLE *ctx) |
| This function Create&initializes a sha256 context. 更多... | |
| OPERATE_RET | tkl_sha256_finish_ret (TKL_HASH_HANDLE ctx, UINT8_T output[32]) |
| This function finishes the sha256 operation, and writes the result to the output buffer. 更多... | |
| OPERATE_RET | tkl_sha256_free (TKL_HASH_HANDLE ctx) |
| This function clears a sha256 context. 更多... | |
| OPERATE_RET | tkl_sha256_starts_ret (TKL_HASH_HANDLE ctx, INT32_T is224) |
| This function starts a sha224 or sha256 checksum calculation. 更多... | |
| OPERATE_RET | tkl_sha256_update_ret (TKL_HASH_HANDLE ctx, const UINT8_T *input, size_t ilen) |
| This function feeds an input buffer into an ongoing sha256 checksum calculation. 更多... | |
Common process - adapter the hash api provide by OS
| OPERATE_RET tkl_md5_create_init | ( | TKL_HASH_HANDLE * | ctx | ) |
This function Create&initializes a md5 context.
| [out] | ctx | md5 handle |
| OPERATE_RET tkl_md5_finish_ret | ( | TKL_HASH_HANDLE | ctx, |
| UINT8_T | output[16] | ||
| ) |
This function finishes the md5 operation, and writes the result to the output buffer.
| [in] | ctx | The context to use. This must be initialized. |
| [out] | output | The sha224 or md5 checksum result. This must be a writable buffer of length 16 Bytes. |
| OPERATE_RET tkl_md5_free | ( | TKL_HASH_HANDLE | ctx | ) |
This function clears a md5 context.
| [in] | ctx | md5 handle |
| OPERATE_RET tkl_md5_starts_ret | ( | TKL_HASH_HANDLE | ctx | ) |
This function starts a md5 checksum calculation.
| [in] | ctx | The context to use. This must be initialized. |
| OPERATE_RET tkl_md5_update_ret | ( | TKL_HASH_HANDLE | ctx, |
| const UINT8_T * | input, | ||
| size_t | ilen | ||
| ) |
This function feeds an input buffer into an ongoing md5 checksum calculation.
| [in] | ctx | The context to use. This must be initialized. |
| [in] | input | The buffer holding the data. This must be a readable buffer of length ilen Bytes. |
| [in] | ilen | The length of the input data in Bytes. |
| OPERATE_RET tkl_sha1_create_init | ( | TKL_HASH_HANDLE * | ctx | ) |
This function Create&initializes a sha1 context.
| [out] | ctx | sha1 handle |
| OPERATE_RET tkl_sha1_finish_ret | ( | TKL_HASH_HANDLE | ctx, |
| UINT8_T | output[20] | ||
| ) |
This function finishes the sha1 operation, and writes the result to the output buffer.
| [in] | ctx | The context to use. This must be initialized. |
| [out] | output | The sha224 or sha1 checksum result. This must be a writable buffer of length 20 Bytes. |
| OPERATE_RET tkl_sha1_free | ( | TKL_HASH_HANDLE | ctx | ) |
This function clears a sha1 context.
| [in] | ctx | sha1 handle |
| OPERATE_RET tkl_sha1_starts_ret | ( | TKL_HASH_HANDLE | ctx | ) |
This function starts a sha224 or sha1 checksum calculation.
| [in] | ctx | The context to use. This must be initialized. |
| OPERATE_RET tkl_sha1_update_ret | ( | TKL_HASH_HANDLE | ctx, |
| const UINT8_T * | input, | ||
| size_t | ilen | ||
| ) |
This function feeds an input buffer into an ongoing sha1 checksum calculation.
| [in] | ctx | The context to use. This must be initialized. |
| [in] | input | The buffer holding the data. This must be a readable buffer of length ilen Bytes. |
| [in] | ilen | The length of the input data in Bytes. |
| OPERATE_RET tkl_sha256_create_init | ( | TKL_HASH_HANDLE * | ctx | ) |
This function Create&initializes a sha256 context.
| [out] | ctx | sha256 handle |
| OPERATE_RET tkl_sha256_finish_ret | ( | TKL_HASH_HANDLE | ctx, |
| UINT8_T | output[32] | ||
| ) |
This function finishes the sha256 operation, and writes the result to the output buffer.
| [in] | ctx | The context to use. This must be initialized. |
| [out] | output | The sha224 or sha256 checksum result. This must be a writable buffer of length 32 Bytes. |
| OPERATE_RET tkl_sha256_free | ( | TKL_HASH_HANDLE | ctx | ) |
This function clears a sha256 context.
| [in] | ctx | sha256 handle |
| OPERATE_RET tkl_sha256_starts_ret | ( | TKL_HASH_HANDLE | ctx, |
| INT32_T | is224 | ||
| ) |
This function starts a sha224 or sha256 checksum calculation.
| [in] | ctx | The context to use. This must be initialized. |
| [in] | is224 | This determines which function to use. This must be either 0 for sha256, or 1 for sha224. |
| OPERATE_RET tkl_sha256_update_ret | ( | TKL_HASH_HANDLE | ctx, |
| const UINT8_T * | input, | ||
| size_t | ilen | ||
| ) |
This function feeds an input buffer into an ongoing sha256 checksum calculation.
| [in] | ctx | The context to use. This must be initialized. |
| [in] | input | The buffer holding the data. This must be a readable buffer of length ilen Bytes. |
| [in] | ilen | The length of the input data in Bytes. |