CmEmbedded_4c_transp CmCryptEcies

Description

CmCryptEcies encrypts a given sequence (up to 32 bytes) with the standard ECIES algorithm. This function is a helper function to use the complete functionality within CodeMeter API.

  • C, C++

Syntax

int CMAPIENTRY CmCryptEcies(CMBYTE* pbPublicKey, CMUINT cbPublicKey, CMBYTE* pbData, CMUINT cbData)

Parameter

pbPublicKey contains the public key of the other side.

cbPublicKey contains the length of the public key pbPublicKey. Has to be exactly 64 bytes.

pbData is an encryption buffer which contains the data to be encrypted. Its length must be equal to the length of this data plus the length of the public key.

cbData contains the length of pbData.

Return

This function returns the number of en-/decrypted bytes. If an error occurred, 0 will be returned.