Home | History | Annotate | Download | only in include
      1 /* Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
      2  * Use of this source code is governed by a BSD-style license that can be
      3  * found in the LICENSE file.
      4  *
      5  * Very simple 8-bit CRC function.
      6  */
      7 
      8 #ifndef VBOOT_REFERENCE_2_CRC8_H_
      9 #define VBOOT_REFERENCE_2_CRC8_H_
     10 
     11 /**
     12  * Calculate CRC-8 of the data, using x^8 + x^2 + x + 1 polynomial.
     13  *
     14  * @param data		Data to CRC
     15  * @param size		Size of data in bytes
     16  * @return CRC-8 of the data.
     17  */
     18 uint8_t vb2_crc8(const void *data, uint32_t size);
     19 
     20 #endif /* VBOOT_REFERENCE_2_CRC8_H_ */
     21