NodeJS Decrypt des3 Unicode
<p>I have the following snippet of code</p>

<pre><code>var crypto = require("crypto");
var iv = new Buffer('d146ec4ce3f955cb', "hex");
var key = new Buffer('dc5c3319dc25c1f6f11f6a792a6dd28864c9dd48be26c2e4', "hex");
var encrypted = new Buffer('6A57201D19B07ABFAE74B453BA46381C', "hex");

var cipher = crypto.createDecipheriv('des3', key, iv);
var result = cipher.update(encrypted);
result += cipher.final();

console.log("result: " + result);
</code></pre>

<p>The result is "password"
This snippet works great for ASCII based words.
However, I have some unicode passwords.</p>

<p>So for instance this is Pi:</p>

<pre><code>UU__3185CDAA15C1CDED
</code></pre>

<p>I have tried using this value, plus the removal of the "UU__" but no gain.
I also tried something like this for the encrypted data:</p>

<pre><code>var encrypted = new Buffer('UU__3185CDAA15C1CDED', "utf16le");
</code></pre>

<p>and</p>

<pre><code>var result = cipher.update(encrypted, 'ucs2');
</code></pre>

<p>but no go..
I get the following error</p>

<pre><code>Error: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decr   ypt
    at Error (native)
    at Decipheriv.Cipher.final (crypto.js:202:26)
    at Object.&lt;anonymous&gt; (/Users/miker/Local Projects/rec10_decryption/server2.js:14:18)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3
</code></pre>

<p>Any assistance would be greatly appreciated.</p>