cookie CmGetSecureData

Description

CmGetSecureData reads encrypted Extended Protected Data or Hidden Data from a CmContainer entry. The retrieved encrypted data has to be decrypted individually.

tmr_02

Triple Mode Redundancy-related information (TMR)

  • C, C++
  • C#
  • Python

Syntax

int CMAPIENTRY CmGetSecureData(HCMSysEntry hcmse, CMSECUREDATA *pcmSecureData, CMENTRYDATA *pcmEntryData);

Parameter

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

pcmSecureData contains a hmtoggle_plus1 CMSECUREDATA structure.

pcmEntryData contains a hmtoggle_plus1 CMENTRYDATA structure receiving the encrypted data.

Return

The return value contains the number of bytes containing the plain data returned encrypted in CMENTRYDATA::mabData. If an error occurred, 0 is returned.

Notes

For Hidden Data, the Hidden Data Access Code (HDAC) must specified and match the stored value.

Syntax

public int CmGetSecureData(HCMSysEntry hcmse, CmSecureData SecureData, out CmEntryData EntryData)

Parameter

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

SecureData contains a hmtoggle_plus1 CmSecureData class).

EntryData contains a hmtoggle_plus1 CmEntryData class receiving the encrypted data.

Return

The return value contains the number of bytes containing the plain data returned encrypted in CMENTRYDATA:abData. If an error occurred, 0 is returned.

Notes

For Hidden Data, the Hidden Data Access Code (HDAC) must specified and match the stored value.

 

Syntax

import cmapi
 
handle.CmGetSecureData(pcmSecureData: CMSECUREDATA) -> CMENTRYDATA
throws CodeMeterApiFailedException()

Parameter

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

pcmSecureData contains a hmtoggle_plus1 cmapi.CMSECUREDATA structure.

pcmEntryData contains a hmtoggle_plus1 cmapi.CMENTRYDATA structure receiving the encrypted data.

Notes

For Hidden Data, the Hidden Data Access Code (HDAC) must specified and match the stored value.