Encryption Functions

Kernel and the RPC Broker provide encryptions functions that can be used to encrypt messages sent between the client and the server.

In Delphi

Include HASH in the "uses" clause of the unit in which you'll be encrypting or decrypting.

Function prototypes are as follows:

function Decrypt(EncryptedText: string): string;
function Encrypt(NormalText: string): string;

On the M Server

To encrypt:

KRN,KDE>S CIPHER=$$ENCRYP^XUSRB1("Hello world!") W CIPHER
/U'llTG~TVl&f-

To decrypt:

KRN,KDE>S PLAIN=$$DECRYP^XUSRB1(CIPHER) W PLAIN
Hello world!

These encryption functions can be used for any communication between the client and the server where encryption is desired.