/* $Id: dspam_crc.c,v 1.8 2011/06/28 00:13:48 sbajic Exp $ */ /* DSPAM COPYRIGHT (C) 2002-2012 DSPAM PROJECT This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include "util.h" #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #include "config.h" #include "libdspam.h" #define SYNTAX "syntax: dspam_crc [token]" int main (int argc, char *argv[]) { unsigned long long crc; if (argc < 2) { printf ("%s\n", SYNTAX); exit (EXIT_FAILURE); } crc = _ds_getcrc64 (argv[1]); printf ("TOKEN: '%s' CRC: %"LLU_FMT_SPEC"\n", argv[1], crc); exit (EXIT_SUCCESS); }