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

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

Static Public Member Functions

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

Detailed Description

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

Member Function Documentation

◆ CalcCRC() [1/2]

static ulong BogaNet.CRC.CRC64.CalcCRC ( params byte[] bytes)
static

Calculate the CRC64 for a byte-array.

Parameters
bytesBytes for the CRC64
Returns
CRC64 as ulong
Exceptions
ArgumentNullException

◆ CalcCRC() [2/2]

static ulong BogaNet.CRC.CRC64.CalcCRC ( string text,
Encoding? encoding = null )
static

Calculate the CRC64 for a string.

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

◆ CalcCRCFile()

static ulong BogaNet.CRC.CRC64.CalcCRCFile ( string file)
static

Calculate the CRC64 for a file.

Parameters
fileFile to crc
Returns
CRC64 as ulong
Exceptions
Exception

◆ CalcCRCFileAsync()

static async Task< ulong > BogaNet.CRC.CRC64.CalcCRCFileAsync ( string file)
static

/// Calculate the CRC64 for a file asynchronously.

Parameters
fileFile to crc
Returns
CRC64 as ulong
Exceptions
Exception

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