diff options
author | Chih-Chung Chang <chihchung@chromium.org> | 2012-10-31 15:04:59 +0800 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-11-02 00:31:08 -0700 |
commit | 807a8d1f91f4ef38835bf236d66b2be1c6a41675 (patch) | |
tree | f1791b11157a360c8a935260750db569eead0142 /cras/src/common/cras_checksum.h | |
parent | 41f7dd493a29a4c021623dbc70d32b06b6308b2b (diff) | |
download | adhd-807a8d1f91f4ef38835bf236d66b2be1c6a41675.tar.gz |
Add a checksum function and unit tests.
BUG=chrome-os-partner:14825
TEST=make check
Change-Id: Ibe403871f7837be03ddc983022ceb55b84cd3f44
Reviewed-on: https://gerrit.chromium.org/gerrit/37008
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Ready: Chih-Chung Chang <chihchung@chromium.org>
Tested-by: Chih-Chung Chang <chihchung@chromium.org>
Diffstat (limited to 'cras/src/common/cras_checksum.h')
-rw-r--r-- | cras/src/common/cras_checksum.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cras/src/common/cras_checksum.h b/cras/src/common/cras_checksum.h new file mode 100644 index 00000000..d995d667 --- /dev/null +++ b/cras/src/common/cras_checksum.h @@ -0,0 +1,21 @@ +/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef CRAS_CHECKSUM_H_ +#define CRAS_CHECKSUM_H_ + +#include "cras_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +uint32_t crc32_checksum(const unsigned char *input, size_t n); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* CRAS_CHECKSUM_H_ */ |