title: Trying to decrypt an private key secure with a passphrase
body: <p>I try with the crypto <code>nodejs</code> module. But I don't succeed to make it works.</p>
  <pre class="lang-js prettyprint-override"><code>import * as crypto from 'crypto';
  import { RsaPrivateKey } from 'crypto';
  
  const privateKey = crypto.privateDecrypt(rsaPrivateKey, Buffer.from('')).toString();
  
  </code></pre>
  <p>I got a passphrase. I need to do this so I can import my certificate inside AWS. Someone have an idea?</p>
  <p>I know that we can do it in golang with</p>
  <pre class="lang-golang prettyprint-override"><code>if x509.IsEncryptedPEMBlock(block) {
    der, wrongPass := x509.DecryptPEMBlock(block, []byte(o.passphrase))
  </code></pre>
  <pre><code>-----BEGIN RSA PRIVATE KEY-----
  Proc-Type: 4,ENCRYPTED
  DEK-Info: AES-256-CBC,XXXXXXXXX
  </code></pre>