FMLiveSwitchCrc32 Class Reference

Calculates CRC32 checksums. More...

Instance Methods

(NSString *) - computeHexWithBytes:
 Computes the 32-bit CRC hex string for an array of bytes. More...
 
(NSString *) - computeHexWithBytes:offset:
 Computes the 32-bit CRC hex string for an array of bytes. More...
 
(NSString *) - computeHexWithBytes:offset:length:
 Computes the 32-bit CRC hex string for an array of bytes. More...
 
(long long) - computeWithBytes:
 Computes the 32-bit CRC for an array of bytes. More...
 
(long long) - computeWithBytes:offset:
 Computes the 32-bit CRC for an array of bytes. More...
 
(long long) - computeWithBytes:offset:length:
 Computes the 32-bit CRC for an array of bytes. More...
 
(long long) - finalXorValue
 Gets the value used to XOR the final result. More...
 
(instancetype) - init
 Initializes a new instance of the FMLiveSwitchCrc32 class using the CRC32 polynomial. More...
 
(long long) - initialValue
 Gets the initial value. More...
 
(instancetype) - initWithPolynomial:
 Initializes a new instance of the FMLiveSwitchCrc32 class using the specified polynomial. More...
 
(instancetype) - initWithPolynomial:reverseBits:
 Initializes a new instance of the FMLiveSwitchCrc32 class using the specified polynomial. More...
 
(long long) - polynomial
 Gets the polynomial. More...
 
(bool) - reverseBits
 Gets a value indicating whether to reverse the bits. More...
 
(void) - setFinalXorValue:
 Sets the value used to XOR the final result. More...
 
(void) - setInitialValue:
 Sets the initial value. More...
 

Class Methods

(FMLiveSwitchCrc32 *) + crc32
 Initializes a new instance of the FMLiveSwitchCrc32 class using the CRC32 polynomial. More...
 
(long long) + crc32cPolynomial
 Gets the CRC32c polynomial. More...
 
(long long) + crc32dPolynomial
 Gets the CRC32d polynomial. More...
 
(long long) + crc32Polynomial
 Gets the CRC32 polynomial. More...
 
(FMLiveSwitchCrc32 *) + crc32WithPolynomial:
 Initializes a new instance of the FMLiveSwitchCrc32 class using the specified polynomial. More...
 
(FMLiveSwitchCrc32 *) + crc32WithPolynomial:reverseBits:
 Initializes a new instance of the FMLiveSwitchCrc32 class using the specified polynomial. More...
 

Detailed Description

Calculates CRC32 checksums.

Method Documentation

◆ computeHexWithBytes:

- (NSString*) computeHexWithBytes: (NSMutableData *)  bytes

Computes the 32-bit CRC hex string for an array of bytes.

Parameters
bytesThe bytes.

◆ computeHexWithBytes:offset:

- (NSString*) computeHexWithBytes: (NSMutableData *)  bytes
offset: (int)  offset 

Computes the 32-bit CRC hex string for an array of bytes.

Parameters
bytesThe bytes.
offsetThe offset.

◆ computeHexWithBytes:offset:length:

- (NSString*) computeHexWithBytes: (NSMutableData *)  bytes
offset: (int)  offset
length: (int)  length 

Computes the 32-bit CRC hex string for an array of bytes.

Parameters
bytesThe bytes.
offsetThe offset.
lengthThe length.

◆ computeWithBytes:

- (long long) computeWithBytes: (NSMutableData *)  bytes

Computes the 32-bit CRC for an array of bytes.

Parameters
bytesThe bytes.

◆ computeWithBytes:offset:

- (long long) computeWithBytes: (NSMutableData *)  bytes
offset: (int)  offset 

Computes the 32-bit CRC for an array of bytes.

Parameters
bytesThe bytes.
offsetThe offset.

◆ computeWithBytes:offset:length:

- (long long) computeWithBytes: (NSMutableData *)  bytes
offset: (int)  offset
length: (int)  length 

Computes the 32-bit CRC for an array of bytes.

Parameters
bytesThe bytes.
offsetThe offset.
lengthThe length.

◆ crc32

+ (FMLiveSwitchCrc32*) crc32

Initializes a new instance of the FMLiveSwitchCrc32 class using the CRC32 polynomial.

◆ crc32cPolynomial

+ (long long) crc32cPolynomial

Gets the CRC32c polynomial.

◆ crc32dPolynomial

+ (long long) crc32dPolynomial

Gets the CRC32d polynomial.

◆ crc32Polynomial

+ (long long) crc32Polynomial

Gets the CRC32 polynomial.

◆ crc32WithPolynomial:

+ (FMLiveSwitchCrc32*) crc32WithPolynomial: (long long)  polynomial

Initializes a new instance of the FMLiveSwitchCrc32 class using the specified polynomial.

Parameters
polynomialThe polynomial.

◆ crc32WithPolynomial:reverseBits:

+ (FMLiveSwitchCrc32*) crc32WithPolynomial: (long long)  polynomial
reverseBits: (bool)  reverseBits 

Initializes a new instance of the FMLiveSwitchCrc32 class using the specified polynomial.

Parameters
polynomialThe polynomial.
reverseBitsWhether to reverse the bits.

◆ finalXorValue

- (long long) finalXorValue

Gets the value used to XOR the final result.

◆ init

- (instancetype) init

Initializes a new instance of the FMLiveSwitchCrc32 class using the CRC32 polynomial.

◆ initialValue

- (long long) initialValue

Gets the initial value.

◆ initWithPolynomial:

- (instancetype) initWithPolynomial: (long long)  polynomial

Initializes a new instance of the FMLiveSwitchCrc32 class using the specified polynomial.

Parameters
polynomialThe polynomial.

◆ initWithPolynomial:reverseBits:

- (instancetype) initWithPolynomial: (long long)  polynomial
reverseBits: (bool)  reverseBits 

Initializes a new instance of the FMLiveSwitchCrc32 class using the specified polynomial.

Parameters
polynomialThe polynomial.
reverseBitsWhether to reverse the bits.

◆ polynomial

- (long long) polynomial

Gets the polynomial.

◆ reverseBits

- (bool) reverseBits

Gets a value indicating whether to reverse the bits.

◆ setFinalXorValue:

- (void) setFinalXorValue: (long long)  value

Sets the value used to XOR the final result.

◆ setInitialValue:

- (void) setInitialValue: (long long)  value

Sets the initial value.