blob: 45495b4223c4a8bcc4d8972bad7ff462b1067e69 [file] [log] [blame]
Damien Millerd4a8b7e1999-10-27 13:42:43 +10001/*
Damien Miller4af51302000-04-16 11:18:38 +10002 *
Damien Miller95def091999-11-25 00:26:21 +11003 * crc32.h
Damien Miller4af51302000-04-16 11:18:38 +10004 *
Damien Miller95def091999-11-25 00:26:21 +11005 * Author: Tatu Ylonen <ylo@cs.hut.fi>
Damien Miller4af51302000-04-16 11:18:38 +10006 *
Damien Miller95def091999-11-25 00:26:21 +11007 * Copyright (c) 1992 Tatu Ylonen, Espoo, Finland
8 * All rights reserved
Damien Miller4af51302000-04-16 11:18:38 +10009 *
Damien Miller95def091999-11-25 00:26:21 +110010 * Created: Tue Feb 11 14:37:27 1992 ylo
Damien Miller4af51302000-04-16 11:18:38 +100011 *
Damien Miller95def091999-11-25 00:26:21 +110012 * Functions for computing 32-bit CRC.
Damien Miller4af51302000-04-16 11:18:38 +100013 *
Damien Miller95def091999-11-25 00:26:21 +110014 */
Damien Millerd4a8b7e1999-10-27 13:42:43 +100015
Damien Miller6536c7d2000-06-22 21:32:31 +100016/* RCSID("$OpenBSD: crc32.h,v 1.6 2000/06/20 01:39:40 markus Exp $"); */
Damien Millerd4a8b7e1999-10-27 13:42:43 +100017
18#ifndef CRC32_H
19#define CRC32_H
20
Damien Miller5428f641999-11-25 11:54:57 +110021/*
22 * This computes a 32 bit CRC of the data in the buffer, and returns the CRC.
23 * The polynomial used is 0xedb88320.
24 */
Damien Millerd4a8b7e1999-10-27 13:42:43 +100025unsigned int crc32(const unsigned char *buf, unsigned int len);
26
Damien Miller95def091999-11-25 00:26:21 +110027#endif /* CRC32_H */