versadac  1
versadac - Scalable Recorder Firmware
DISE_encryption_versadac.h
1 // Copyright (c) 2012 Invensys Eurotherm Ltd.
3 //
4 // MODULE : IDMEncryption
5 // FILENAME : DISE_Crypto_simplewrapper.h
6 // AUTHOR : Adrian Oliver
7 // CREATED : November 2012
8 // DESCRIPTION : Header file for IDM Encryption:
10 // These functions will use Instrument database data to automatically generate
11 // Encryption/Decryption keys.
12 //
13 // Once the key has been generated, it uses the Authenticated Encryption/Decryption
14 // functions
15 
16 // The Key generation is automatic - however on initialisation, the device/IDM
17 // needs to register here which instrument database parameters are to be used
18 // during the key generation. This is done by the host providing the
19 // structure - if this is not provided, this module will fail to link
21 
22 #ifndef DeviceIDMSymmetricEncryption_VERSADAC_H
23 #define DeviceIDMSymmetricEncryption_VERSADAC_H
24 
25 #include "stdtypes.h"
26 
31 void DeviceIDMSymmetricEncryption_Initialise(void);
32 
33 bool DeviceIDMSymmetricEncryption_ReadDeviceData(unsigned long CISP,
34  unsigned char* pDataBuffer, // if NULL, then only returns pRequiredDataBufferLength
35  unsigned int DataBufferLengthMaximum, // tells use the size available in pRequiredDataBufferLength
36  unsigned int* pIDMFlashMemoryAddress, // what address should this be read from?
37  unsigned int* pRequiredDataBufferLength // tells us how manys are/were required
38  );
39 
41 void DeviceIDMSymmetricEncryption_unicode_to_char(char* z_binarybuffer,
42  int z_binarybufferlength,
43  unicode_p z_unicodeString,
44  int z_unicodeStringLength);
45 
46 
48 
49 #endif