00001 /* 00002 * Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC") 00003 * 00004 * Permission to use, copy, modify, and/or distribute this software for any 00005 * purpose with or without fee is hereby granted, provided that the above 00006 * copyright notice and this permission notice appear in all copies. 00007 * 00008 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 00009 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 00010 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 00011 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 00012 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 00013 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00014 * PERFORMANCE OF THIS SOFTWARE. 00015 */ 00016 00017 #ifndef ISC_CRC64_H 00018 #define ISC_CRC64_H 1 00019 00020 /*! \file isc/crc64.h 00021 * \brief CRC64 in C 00022 */ 00023 00024 #include <isc/lang.h> 00025 #include <isc/types.h> 00026 00027 ISC_LANG_BEGINDECLS 00028 00029 void 00030 isc_crc64_init(isc_uint64_t *crc); 00031 /*% 00032 * Initialize a new CRC. 00033 * 00034 * Requires: 00035 * * 'crc' is not NULL. 00036 */ 00037 00038 void 00039 isc_crc64_update(isc_uint64_t *crc, const void *data, size_t len); 00040 /*% 00041 * Add data to the CRC. 00042 * 00043 * Requires: 00044 * * 'crc' is not NULL. 00045 * * 'data' is not NULL. 00046 */ 00047 00048 void 00049 isc_crc64_final(isc_uint64_t *crc); 00050 /*% 00051 * Finalize the CRC. 00052 * 00053 * Requires: 00054 * * 'crc' is not NULL. 00055 */ 00056 00057 ISC_LANG_ENDDECLS 00058 00059 #endif /* ISC_CRC64_H */