BogaNet 1.4.0
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
BogaNet.CRC.CRC32 Class Referenceabstract

Implementation of CRC32. NOTE: never use CRC for integrity checks, use hashes instead! More...

Static Public Member Functions

static uint CalcCRC (params byte[] bytes)
 Calculate the CRC32 for a byte-array.
 
static uint CalcCRC (string text, Encoding? encoding=null)
 Calculate the CRC32 for a string.
 
static uint CalcCRCFile (string file)
 Calculate the CRC32 for a file.
 
static async Task< uint > CalcCRCFileAsync (string file)
 /// Calculate the CRC32 for a file asynchronously.
 

Detailed Description

Implementation of CRC32. NOTE: never use CRC for integrity checks, use hashes instead!

Member Function Documentation

◆ CalcCRC() [1/2]

static uint BogaNet.CRC.CRC32.CalcCRC ( params byte[] bytes)
static

Calculate the CRC32 for a byte-array.

Parameters
bytesBytes for the CRC32
Returns
CRC32 as uint
Exceptions
ArgumentNullException

◆ CalcCRC() [2/2]

static uint BogaNet.CRC.CRC32.CalcCRC ( string text,
Encoding? encoding = null )
static

Calculate the CRC32 for a string.

Parameters
textstring for the CRC32
encodingEncoding of the string (optional, default: UTF8)
Returns
CRC32 as uint
Exceptions
ArgumentNullException

◆ CalcCRCFile()

static uint BogaNet.CRC.CRC32.CalcCRCFile ( string file)
static

Calculate the CRC32 for a file.

Parameters
fileFile to crc
Returns
CRC32 as uint
Exceptions
Exception

◆ CalcCRCFileAsync()

static async Task< uint > BogaNet.CRC.CRC32.CalcCRCFileAsync ( string file)
static

/// Calculate the CRC32 for a file asynchronously.

Parameters
fileFile to crc
Returns
CRC32 as uint
Exceptions
Exception

The documentation for this class was generated from the following file: