ssCore.Crypto.encryptString

Encrypt a string.


Availability:

First available in version 3.0 build 2039.


Input Parameters:

key - The string that will be used to encode the data. You will also need this key to decrypt your data later.

data - The data to be encrypted. If the length is not a multiple of 8 spaces will be added to the end of the data buffer and removed when the data is decrypted.


Output Parameters:

result - The encrypted data block stored as a hex string so the binary data that may result from encrypting the data can be represented in Flash.


Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.Crypto.encryptString( paramsObject [, callbackParamsObject] [, errorParamsObject] );


Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.Crypto.encryptString( paramsObject );


Notes:

None.


Examples:

var return_obj = ssCore.Crypto.encryptString({data:"A string to be encrypted", key:"secret01"});

ssDebug.trace(return_obj.result);