title: node-forge package error with RSA enc/dec
body: <p>I'm using node-forge npm on my meteor.js web app. I'm trying to do RSA encryption on some plain text according to this example: <a href="https://github.com/digitalbazaar/forge#rsa" rel="nofollow">https://github.com/digitalbazaar/forge#rsa</a> </p>
  
  <p>The problem arrives when I want to decrypt the ciphertext where I want to get back the plaintext where it says the encryption block is invalid.</p>
  
  <p>Following the example, I have to encrypt the bytes from the string so all that is done, but I don't understand why it fails on decryption? Any guesses?</p>
  
  <pre><code>rsaEncrypt:function(pubPem,privPem,plainText){
  
  console.log(plainText);
  
  var str = plainText;
  var bytes = [];
  
  for (var i = 0; i &lt; str.length; ++i) {
    bytes.push(str.charCodeAt(i));
  }
  
  console.log("BAJTOVI:");
  console.log(bytes);
  
  var publicKey = pki.publicKeyFromPem(pubPem);
  console.log(publicKey);
  
  var encrypted = publicKey.encrypt(bytes);
  console.log("Encryption: ");
  console.log(encrypted);
  
  var privateKey = pki.privateKeyFromPem(privPem);
  var decrypted = privateKey.decrypt(encrypted);
  
  console.log("Decryption: ");
  console.log(decrypted);
  
  function bin2String(decrypted) {
    var result = "";
    for (var i = 0; i &lt; decrypted.length; i++) {
      result += String.fromCharCode(parseInt(decrypted[i], 2));
    }
    return result;
  }
  console.log("OPET TEXT:");
  console.log(result);
  
  return decryted;
  
  },
  </code></pre>
  
  <p>The problem i get from the server:</p>
  
  <pre><code>Exception while invoking method 'rsaEncrypt' Error: Encryption block is invalid.
  I20151110-21:22:05.279(1)?     at Object._decodePkcs1_v1_5 [as decode] (/Users/mrcina/Meteor Projects/cryptonic/.meteor/local/isopacks/npm-container/npm/node_modules/node-forge/js/rsa.js:1446:11)
  I20151110-21:22:05.279(1)?     at Object.key.decrypt (/Users/mrcina/Meteor Projects/cryptonic/.meteor/local/isopacks/npm-container/npm/node_modules/node-forge/js/rsa.js:1083:19)
  I20151110-21:22:05.279(1)?     at [object Object].Meteor.methods.rsaEncrypt (server/methods.js:49:32)
  I20151110-21:22:05.279(1)?     at maybeAuditArgumentChecks (livedata_server.js:1698:12)
  I20151110-21:22:05.279(1)?     at livedata_server.js:708:19
  I20151110-21:22:05.279(1)?     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
  I20151110-21:22:05.279(1)?     at livedata_server.js:706:40
  I20151110-21:22:05.279(1)?     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
  I20151110-21:22:05.280(1)?     at livedata_server.js:704:46
  I20151110-21:22:05.280(1)?     at tryCallTwo (/Users/mrcina/.meteor/packages/promise/.0.5.1.1wnrf8h++os+web.browser+web.cordova/npm/node_modules/meteor-promise/node_modules/promise/lib/core.js:45:5)
  </code></pre>
  
  <p>THis line: <strong>var decrypted = privateKey.decrypt(encrypted);</strong></p>