Testing is Rocket Science Not Brain Surgery

Almost all of the World's Greatest Accomplishments Were The Result of Great Planning!

Testing is Rocket Science Not Brain Surgery header image 2

Code Snippets(HP LoadRunner): Decrypting Passwords and Using those Values in a web_submit statement by Howard Clark

May 7th, 2008 · 1 Comment · Uncategorized

Table of contents for Code Snippets(HP LoadRunner)

  1. Code Snippets(HP LoadRunner): Randomly Selecting an Array of Values and Using That Value As A Parameter by Howard Clark
  2. Code Snippets(HP LoadRunner): Decrypting Passwords and Using those Values in a web_submit statement by Howard Clark
  3. Code Snippet(HP LoadRunner) : FILE I/O and creating dummy XMLs

declare either as a global in the globals.h available in multi-protocol scripts or outside of the vuser_init

//placeholder variables
char *Temp;
char decrypted_password;

//Retrieves the paramater value and decrypts it.
Temp = lr_eval_string(“{UserPwd}”);
Temp = lr_decrypt(Temp);
//optional output of decrypted parameter value
//_output_message(“%s”, Temp);

//creates a new parameter that can be used in a text string with paramater delimiters
lr_save_string(Temp, “decrypted_password”);

For example:
web_submit_data
.
.
“Value={decrypted_password}”, ENDITEM

A trivial but useful code snippet to meet security requirements when the login credentials are being passed outside the company in a hosted Performance Center solution and/or where electronic submission or network storage is being used.

Tags:

One Comment so far ↓

Leave a Comment