Files
OpenCellular/firmware/2lib/include/2crc8.h
Randall Spangler 3333e57849 vboot2: Add nvstorage and secdata functions
This is the second of several CLs adding a more memory- and
code-efficient firmware verification library.

BUG=chromium:370082
BRANCH=none
TEST=make clean && COV=1 make

Change-Id: I1dd571e7511bff18469707d5a2e90068e68e0d6f
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/199841
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
2014-06-05 23:14:27 +00:00

21 lines
550 B
C

/* Copyright (c) 2014 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.
*
* Very simple 8-bit CRC function.
*/
#ifndef VBOOT_REFERENCE_2_CRC8_H_
#define VBOOT_REFERENCE_2_CRC8_H_
/**
* Calculate CRC-8 of the data, using x^8 + x^2 + x + 1 polynomial.
*
* @param data Data to CRC
* @param size Size of data in bytes
* @return CRC-8 of the data.
*/
uint8_t vb2_crc8(const void *data, uint32_t size);
#endif /* VBOOT_REFERENCE_2_CRC8_H_ */