summaryrefslogtreecommitdiff
path: root/cras/src/common/cras_checksum.h
diff options
context:
space:
mode:
authorChih-Chung Chang <chihchung@chromium.org>2012-10-31 15:04:59 +0800
committerGerrit <chrome-bot@google.com>2012-11-02 00:31:08 -0700
commit807a8d1f91f4ef38835bf236d66b2be1c6a41675 (patch)
treef1791b11157a360c8a935260750db569eead0142 /cras/src/common/cras_checksum.h
parent41f7dd493a29a4c021623dbc70d32b06b6308b2b (diff)
downloadadhd-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.h21
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_ */