Null padding a string in Javascript
<p>So I am trying to implement NT &amp; Lan Manager hashes in JavaScript (yeah I know not the best language choice for it!) but its to be used on a simple static web page where post-backs are not possible - so no PHP or .NET or Java. </p>

<p>The Issue I'm having is the first part of the protocol, basically you must ensure that the password is 14 characters, if its over 14 you need to trim (easy), however if its under 14 you need to null pad the password string to get it to fourteen characters. </p>

<p>How does one null pad a string in JavaScript? </p>

<p>Please note, I'm not asking how to zero pad a string in Javascript. </p>

<p>(Also bonus question, if anyone knows of any pre-made NT or LM hashing libraries in JS, I'd really appreciate the heads up!) </p>
