title: Adding \000 to each char in a password string
body: <p>Why would one do this.</p>
  
  <pre><code>for ($i = 0; $i &lt; $len; $i++) {
      $unicodepassword .= "{$passwd{$i}}\000";
  }
  </code></pre>
  
  <p>Context: This is a password set when creating or modifying a user in Active directory. We are rewriting some ancient code and nothing works without this. Making changes in our LDAP does not require this kind of "encoding".</p>
  
  <p>Also the result of this exercise is called "unicodepassword", seems strange to me. </p>