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

lr.decrypt

Decrypts an encoded string

C#

string lr.decrypt( String EncodedString );

VB.NET

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

Arguments

Name Comments
EncodedString The encoded string you want to decrypt.

The lr.decrypt function decrypts an encoded string. One common way to use this function is to provide a password to a function without entering the literal password in the script. When you run the script, the test run component decrypts the password.

It is possible to create an lr.decrypt call from a value in a 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 for later use, copy the 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 Encoded string 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

The decoded string. If decode fails, returns null.

Parameterization

All string input arguments can be passed using standard parameterization.