nn::util::Crc16::Calculate Member Function

Syntax

static u16 Calculate(
const void * input,
size_t length,
u16 context = CRC16_STANDARD_INIT
);

Arguments

Name Description
in input Pointer to the input data.
in length Size of the input data.
in context Initial value of the context. Normally the default value is used.

Return Values

The calculation result.

Description

Calls all the associated functions needed to calculate CRC-16, and gets the calculation result.

Internally, calls the following functions together: nn::util::Crc16::InitializeContext, nn::util::Crc16::Update, and nn::util::Crc16::GetHash. This function cannot be used if you need to split up the data and call nn::util::Crc16::Update multiple times. Any size and alignment position can be used for the input data.

Revision History

2010/10/15
Initial version.

CONFIDENTIAL