1 /* $NetBSD: crc64.h,v 1.1.1.3 2014/12/10 03:34:44 christos Exp $ */ 2 3 /* 4 * Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC") 5 * 6 * Permission to use, copy, modify, and/or distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 11 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 12 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 13 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 14 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 15 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 #ifndef ISC_CRC64_H 20 #define ISC_CRC64_H 1 21 22 /*! \file isc/crc64.h 23 * \brief CRC64 in C 24 */ 25 26 #include <isc/lang.h> 27 #include <isc/types.h> 28 29 ISC_LANG_BEGINDECLS 30 31 void 32 isc_crc64_init(isc_uint64_t *crc); 33 /*% 34 * Initialize a new CRC. 35 * 36 * Requires: 37 * * 'crc' is not NULL. 38 */ 39 40 void 41 isc_crc64_update(isc_uint64_t *crc, const void *data, size_t len); 42 /*% 43 * Add data to the CRC. 44 * 45 * Requires: 46 * * 'crc' is not NULL. 47 * * 'data' is not NULL. 48 */ 49 50 void 51 isc_crc64_final(isc_uint64_t *crc); 52 /*% 53 * Finalize the CRC. 54 * 55 * Requires: 56 * * 'crc' is not NULL. 57 */ 58 59 ISC_LANG_ENDDECLS 60 61 #endif /* ISC_CRC64_H */ 62