Utility Functions and C Language Reference > Utility Functions: Scripting Languages (lr.) > Alphabetical Listing > lr.decrypt


Decrypts an encoded string


function lr.decrypt(  EncodedString  )


Function lr.decrypt(  EncodedString  )
Example: lr.decrypt String and Parameter Functions


Name Comments
EncodedString The encoded string you want to decrypt.

The lr.decrypt function decrypts an encoded string. This function is generated during recording to encode passwords. VuGen records the actual password but displays an encoded version of the password within the lr.decrypt function.

When you run the script, the test run component decrypts the password. Each time you record, VuGen encrypts the password differently, even when you use the same password.

It is possible to create an lr.decrypt call from a recorded value in the script. Select an entire string between quote marks, not including the quote marks themselves. Right-click in the selected string and choose the Encrypt string option. The original string is replaced with an lr.decrypt call where the EncodedString argument is the original string after encoding.

To get an encrypted value from a recorded value for later use, copy the recorded value. Then run Start >Programs >LoadRunner> Tools > Password Encoder. Paste the value into the Password field, and click Generate. The encrypted string appears in the Encodedstring box. Click the Copy button, then paste the encrypted string into a parameter for later use, or assign the value to a string variable.

VuGen uses 32 bit encryption.

Return Values

On success, returns the decoded string. On error, returns NULL.


All input arguments can be parameterized using standard parameterization.