C Developer's API Reference guide

Functions

Total number of functions: 2. Functions supported are:

get_nearest_power_of_two($value, $oBits)
crypt_process($block, $size, $crc, $id)

get_nearest_power_of_two

get_nearest_power_of_two($value, $oBits)

[Since version 0.0.1]

This private function is used to get the nearest higher power of two to the value, it's also returning number of bits used for the number returned in oBits variable.

@value [int]: value to which find the nearest power of two
@oBits [int]: number of bits used by the return value as it's power of two
Returns: nearest higher power of two to value

crypt_process

crypt_process($block, $size, $crc, $id)

[Since version 0.0.1]

This function is used to process the encryption and decryption of the data block.

@block [buffer]: buffer of data to be encrypted/decrypted
@size [int]: size of buffer
@crc [uint32_t]: CRC value for the data block (used as a part of algorithm)
@id [int]: identifier of the chunk to be encoded (used as a part of algorithm)
Returns: output buffer of identical length as original