title: Base64 Authentication Username and password
body: <p>I have been able to write a python script to get Base 64 auth for my username and password (Admin:password) equal to --> Basic QWRtaW46cGFzc3dvcmQ=
  When I add that to my header manager as: 
  Authorization  Basic QWRtaW46cGFzc3dvcmQ=<br>
  all my HTTP Requests succeed.</p>
  
  <hr>
  
  <p>in Jmeter I have googled and I find to add below in Bean PreProcessor:</p>
  
  <pre><code>import org.apache.commons.codec.binary.Base64;
  String username = vars.get("Username");
  String password = vars.get("Password");
  String combineduserpass = username + ":" + password;
  byte[] encodedUsernamePassword =         
  Base64.encodeBase64(combineduserpass.getBytes());
  vars.put("base64HeaderValue",new String(encodedUsernamePassword));
  </code></pre>
  
  <p>System.out.println(encodedUsernamePassword);</p>
  
  <p>but that system output gives me --> [B@558e816b  which is incorrect </p>
  
  <p>when I add that to my Header manager like this</p>
  
  <p>Authorization  Basic ${base64HeaderValue}  </p>
  
  <p>my HTTP Req obviously fails. The Base64 for "Admin:password should really be Basic QWRtaW46cGFzc3dvcmQ=  and not  [B@558e816b</p>