ex
Fork of mbed-os-example-mbed5-blinky by
DuerOS-Light-SDK-v1.1.0/duer-os-light/src/iot-baidu-ca/source/baidu_ca_hashcode.h@47:9e361da97763, 2017-07-18 (annotated)
- Committer:
- TMBOY
- Date:
- Tue Jul 18 16:54:45 2017 +0800
- Revision:
- 47:9e361da97763
?
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| TMBOY | 47:9e361da97763 | 1 | // Copyright 2017 Baidu Inc. All Rights Reserved. |
| TMBOY | 47:9e361da97763 | 2 | // Author: Su Hao (suhao@baidu.com) |
| TMBOY | 47:9e361da97763 | 3 | // |
| TMBOY | 47:9e361da97763 | 4 | // Description: The hashcode algorithm |
| TMBOY | 47:9e361da97763 | 5 | |
| TMBOY | 47:9e361da97763 | 6 | #ifndef BAIDU_IOT_TINYDU_IOT_OS_SRC_IOT_BAIDU_CA_SOURCE_BAIDU_CA_HASHCODE_H |
| TMBOY | 47:9e361da97763 | 7 | #define BAIDU_IOT_TINYDU_IOT_OS_SRC_IOT_BAIDU_CA_SOURCE_BAIDU_CA_HASHCODE_H |
| TMBOY | 47:9e361da97763 | 8 | |
| TMBOY | 47:9e361da97763 | 9 | #include "baidu_ca_types.h" |
| TMBOY | 47:9e361da97763 | 10 | |
| TMBOY | 47:9e361da97763 | 11 | /* |
| TMBOY | 47:9e361da97763 | 12 | * Generate the hashcode by data |
| TMBOY | 47:9e361da97763 | 13 | * |
| TMBOY | 47:9e361da97763 | 14 | * @Param data, in, the data will be computed |
| TMBOY | 47:9e361da97763 | 15 | * @Param size, in, the data size |
| TMBOY | 47:9e361da97763 | 16 | * @Param seed, in, the hash seed |
| TMBOY | 47:9e361da97763 | 17 | * @Return bca_u32_t, the hashcode value |
| TMBOY | 47:9e361da97763 | 18 | */ |
| TMBOY | 47:9e361da97763 | 19 | BCA_INT bca_u32_t bca_hashcode(const char* data, |
| TMBOY | 47:9e361da97763 | 20 | bca_size_t size, |
| TMBOY | 47:9e361da97763 | 21 | bca_u32_t seed); |
| TMBOY | 47:9e361da97763 | 22 | |
| TMBOY | 47:9e361da97763 | 23 | #endif // BAIDU_IOT_TINYDU_IOT_OS_SRC_IOT_BAIDU_CA_SOURCE_BAIDU_CA_HASHCODE_H |
