Utility Functions and C Language Reference > Utility Functions: Java (lr.) > Alphabetical Listing > lr_decrypt


Decrypts an encoded string

C Language

char *lr_decrypt( const char *EncodedString);
Example: lr_decrypt String and Parameter Functions

Java Language

String lr.decrypt( String EncodedString);
Example: lr.decrypt String and Parameter Functions Java Syntax


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

This function returns a pointer to the decoded string or NULL on error.


Parameterization is not applicable to the argument of this function. To apply parameterization, use lr_eval_string.