CTexasAPI::ExportEntityKey
ExportEntityKey is a separate method because it creates a new connection just to transfer the logon credentials to the server. This preventing any brute force attack on the keys as it is too small for any cipher encrypted and decrypted pair.
unsigned int ExportEntityKey( int version, unsigned int entityID, const char *oldPassword, const char *newPassword, const char *keyDirectory, short language, pCallbackRoutine connectionHandler, void* object );
Parameters
| version | This is the key version, 0 will use the default version for this compilation, currently it is 2 for 256bit AES. |
| entityID | The entity ID for the user. |
| oldPassword | If the current logon user does not have control power of the entity in entityID, then the password of the user must be given. |
| newPassword | |
| keyDirectory | If the first four bytes is ".key" then buffer contains the texas key, otherwise the key is the key path directory |
| language | Used for error messages from the server about the connection. |
| connectionHandler | Used by the server to return infomation about the connection. |
| objectID | Returned to the connectionHandler. |
Return Values
If the method succeeds, the return value is zero else see error codes for more details.
Remarks
Example Use
if(server.ExportEntityKey(0,entitiyID,
TEXT("oldPassword"),TEXT("newPassword"),TEXT("C:\\KeyPath"),
0,NULL,NULL))
MessageBox(TEXT("Unable to export entity key"));

