VirtualBox

source: vbox/trunk/include/iprt/crc32.h@ 2435

Last change on this file since 2435 was 1, checked in by vboxsync, 55 years ago

import

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 KB
Line 
1/** @file
2 * InnoTek Portable Runtime - CRC32.
3 */
4
5/*
6 * Copyright (C) 2006 InnoTek Systemberatung GmbH
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License as published by the Free Software Foundation,
12 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
13 * distribution. VirtualBox OSE is distributed in the hope that it will
14 * be useful, but WITHOUT ANY WARRANTY of any kind.
15 *
16 * If you received this file as part of a commercial VirtualBox
17 * distribution, then only the terms of your commercial VirtualBox
18 * license agreement apply instead of the previous paragraph.
19 */
20
21#ifndef __iprt_crc32_h__
22#define __iprt_crc32_h__
23
24
25#include <iprt/cdefs.h>
26#include <iprt/types.h>
27
28
29__BEGIN_DECLS
30
31/** @defgroup grp_rt_crc32 RTCrc32 - CRC32 Calculation
32 * @ingroup grp_rt
33 * @{
34 */
35
36/**
37 * Calculate CRC32 for a memory block.
38 *
39 * @returns CRC32 for the memory block.
40 * @param pv Pointer to the memory block.
41 * @param cb Size of the memory block in bytes.
42 */
43RTDECL(uint32_t) RTCrc32(const void *pv, size_t cb);
44
45/**
46 * Start a multiblock CRC32 calculation.
47 *
48 * @returns Start CRC32.
49 */
50RTDECL(uint32_t) RTCrc32Start(void);
51
52/**
53 * Processes a multiblock of a CRC32 calculation.
54 *
55 * @returns Intermediate CRC32 value.
56 * @param uCRC32 Current CRC32 intermediate value.
57 * @param pv The data block to process.
58 * @param cb The size of the data block in bytes.
59 */
60RTDECL(uint32_t) RTCrc32Process(uint32_t uCRC32, const void *pv, size_t cb);
61
62/**
63 * Complete a multiblock CRC32 calculation.
64 *
65 * @returns CRC32 value.
66 * @param uCRC32 Current CRC32 intermediate value.
67 */
68RTDECL(uint32_t) RTCrc32Finish(uint32_t uCRC32);
69
70
71
72/** @} */
73
74__END_DECLS
75
76#endif
77
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette