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

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

Static Public Member Functions

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

Detailed Description

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

Member Function Documentation

◆ CalcCRC() [1/2]

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

Calculate the CRC8 for a byte-array.

Parameters
bytesBytes for the CRC8
Returns
CRC8 as byte
Exceptions
ArgumentNullException

◆ CalcCRC() [2/2]

static byte BogaNet.CRC.CRC8.CalcCRC ( string text,
Encoding? encoding = null )
static

Calculate the CRC8 for a string.

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

◆ CalcCRCFile()

static byte BogaNet.CRC.CRC8.CalcCRCFile ( string file)
static

Calculate the CRC8 for a file.

Parameters
fileFile to crc
Returns
CRC8 as byte
Exceptions
Exception

◆ CalcCRCFileAsync()

static async Task< byte > BogaNet.CRC.CRC8.CalcCRCFileAsync ( string file)
static

/// Calculate the CRC8 for a file asynchronously.

Parameters
fileFile to crc
Returns
CRC8 as byte
Exceptions
Exception

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