Files
mars-nwe/include/core/crc.h
Mario Fetka e564ee70ba
All checks were successful
Source release / source-package (push) Successful in 1m16s
core: import NSS CRC helper into libnwcore
2026-06-12 15:43:40 +02:00

63 lines
2.1 KiB
C

/****************************************************************************
|
| (C) Copyright 1995-1997 Novell, Inc.
| All Rights Reserved.
|
| This program is free software; you can redistribute it and/or
| modify it under the terms of version 2 of the GNU General Public
| License as published by the Free Software Foundation.
|
| 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 General Public License for more details.
|
| You should have received a copy of the GNU General Public License
| along with this program; if not, contact Novell, Inc.
|
| To contact Novell about this file by physical or electronic mail,
| you may find current contact information at www.novell.com
|
|***************************************************************************
|
| NetWare Advance File Services (PSS) Initialization module
|
|---------------------------------------------------------------------------
|
| $Author: taysom $
| $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $
| $RCSfile$
| $Revision: 465 $
|
|---------------------------------------------------------------------------
| This module is used to: Definitions for Cyclic Redundency Checks (CRC)
+-------------------------------------------------------------------------*/
#ifndef _CRC_H_
#define _CRC_H_
#ifndef _ZOMNI_H_
#include <zOmni.h>
#endif
typedef LONG crc_t;
extern crc_t crc(BYTE *buf, NINT len);
extern crc_t hashLowerString(char *t);
extern crc_t hashLowerUnicode(unicode_t *t);
extern crc_t hashString(char *t);
extern crc_t hashUnicode(unicode_t *t);
extern crc_t lowerStringCRC(char *t);
extern crc_t stringCRC(char *t);
extern crc_t updateCRC(crc_t crc, BYTE *buf, NINT len);
extern crc_t updateCRCFromString(crc_t crc, char *t);
extern crc_t updateCRCFromLowerString(crc_t crc, char *t);
extern crc_t updateCRCFromLowerStringWithLen(crc_t crc, char *t, NINT len);
extern crc_t updateCRCFromLowerUnicode(crc_t crc, unicode_t *t);
extern crc_t updateCRCFromUnicode(crc_t crc, unicode_t *t);
#endif