cookie CmCalculatePioCoreKey

Description

CmCalculatePioCoreKey calculates the Product Item Option Core Key (PIOCK) from the given data.

tmr_02

Triple Mode Redundancy-related information (TMR)

  • C, C++
  • C#
  • Python

Syntax

int CMAPIENTRY CmCalculatePioCoreKey(HCMSysEntry hcmse, CMPIOCK *pcmPioCK, CMBYTE* pbPioCK, CMUINT cbPioCK)

Parameter

hcmse contains a handle opened with CmAccess / CmAccess2 (must be an Entry Access).

pcmPioCK contains a hmtoggle_plus1 PIOCKstructure containing the needed data for the PIOCK creation.

pbPioCK receives the calculated PIOCK.

cbPioCK contains the length of the pbPioCK buffer.  

Return

CmCalculatePioCoreKey returns CM_BLOCK_SIZE (currently 16), if the creation of the PIOCK was successful. If an error occurred, 0 is returned.

Notes

This function is only for Licensor side because a FSB is needed!

Syntax

public bool CmCalculatePioCoreKey(HCMSysEntry hcmse, CmPioCk PioCK, out byte[] abPioCK)

Parameter

hcmse contains a handle opened with CmAccess / CmAccess2 (must be an Entry Access).

PioCK contains a hmtoggle_plus1 CmPioCK class containing the needed data for the PIOCK creation.

abPioCK receives the calculated PIOCK.

Return

CmCalculatePioCoreKey returns true, if the creation of the PIOCK was successful. If an error occurred, false is returned.

Notes

This function is only for Licensor side because a FSB is needed!

 

Syntax

import cmapi
 
handle.CmCalculatePioCoreKey(pcmPioCK: cmapi.CMPIOCK) -> bytes
throws CodeMeterApiFailedException()

Parameter

handle is the handle opened with CmAccess2 (must be an Entry Access).

pcmPioCK contains a hmtoggle_plus1 cmapi.PIOCKstructure containing the needed data for the PIOCK creation.

 

Return

CmCalculatePioCoreKey returns the created PIOCK. If an error occurred, an exception is thrown.

This function is only for Licensor side because a FSB is needed!