ex

Fork of mbed-os-example-mbed5-blinky by mbed-os-examples

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers baidu_ca_hashcode.h Source File

baidu_ca_hashcode.h

00001 // Copyright 2017 Baidu Inc. All Rights Reserved.
00002 // Author: Su Hao (suhao@baidu.com)
00003 //
00004 // Description: The hashcode algorithm
00005 
00006 #ifndef BAIDU_IOT_TINYDU_IOT_OS_SRC_IOT_BAIDU_CA_SOURCE_BAIDU_CA_HASHCODE_H
00007 #define BAIDU_IOT_TINYDU_IOT_OS_SRC_IOT_BAIDU_CA_SOURCE_BAIDU_CA_HASHCODE_H
00008 
00009 #include "baidu_ca_types.h"
00010 
00011 /*
00012  * Generate the hashcode by data
00013  *
00014  * @Param data, in, the data will be computed
00015  * @Param size, in, the data size
00016  * @Param seed, in, the hash seed
00017  * @Return bca_u32_t, the hashcode value
00018  */
00019 BCA_INT bca_u32_t bca_hashcode(const char* data,
00020                                bca_size_t size,
00021                                bca_u32_t seed);
00022 
00023 #endif // BAIDU_IOT_TINYDU_IOT_OS_SRC_IOT_BAIDU_CA_SOURCE_BAIDU_CA_HASHCODE_H