TAstaServerSocket.OnEncrypt
Applies to
TAstaServerSocket
Declaration
property OnEncrypt: TAstaServerStringEvent;
Description
The OnEncrypt event handler allows you to add code for encrypting a message before transmitting it
across a network.
Note: If you add encryption routines to the OnEncrypt event handlers, then you must add decryption routines to the OnDecrypt event handlers and of course the Server and Client must use the same Encryption scheme. You must place your code in the appropriate event handlers (OnEncrypt and OnDecrypt) of the AstaClientSocket and the AstaServerSocket. The Sender:TObject on the AstaServer is a ClientSocket:TCustomWinSocket. Using the ClientSocket you are able to access the UserRecord to provide stronger encyrption with multiple keys.
procedure TForm1.AstaServerSocket1Encrypt(Sender: TObject; var S: string);
begin
// the Sender is the ClientSocket:TCustomWinSocket
S := MyEncryptRoutine(S);
end;
There are many third party components that can be used to secure your ASTA applications. Because of US export laws ASTA cannot supply strong encryption routines as part of ASTA.