title: how to create public key to 34 max lenght characters using node js and crypto js
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function generateKeyPair() {
      if (fs.existsSync('privateKey.pem' || 'publicKey.pem')) {
          console.log("You already have keys, move your keys if you want generate new Wallet (publicKey.pem &amp; privateKey.pem)")
      } else {
          const { privateKey, publicKey } = crypto.generateKeyPairSync('rsa', {
              modulusLength: 2048,
              publicKeyEncoding: { type: 'spki', format: 'pem' },
              privateKeyEncoding: { type: 'pkcs8', format: 'pem' }
          })
  
          fs.writeFile('privateKey.pem', privateKey, function (err) {
              if (err) throw err
          })
  
          fs.writeFile('publicKey.pem', publicKey, function (err) {
              if (err) throw err
          })
  
          console.log('Private key : ' + privateKey)
          console.log('\nPublic key : ' + publicKey)
          console.log("Yours keys has been generated into the main folder. (privateKey.pem &amp; publicKey.pem)")
      }
  }
  generateKeyPair()</code></pre>
  </div>
  </div>
  </p>
  <p>this code gives me a public key like this one</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>-----BEGIN PUBLIC KEY-----
  MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3ocpUvL9gnAHkbLY1zlu
  0qIOa9S/D1O5yK+Hj6ttiaFSsyU/5ca6JSVb3BYetf4vS0Fn7IYxfoxTjuJAg/K/
  MDGzr0WUQaFTXcRbvGQhxAjdmzrW8zjkBHuEGHA1C3x5f1uqqD20mRZQgp6yEg6e
  TIDWXWdmEWajVbVNEoYRra9DYPJqfXGGeNgWgXmM+wvbc30+5tx7emKCiRQuMaFX
  rXvuH0DQMzGQVyejqSOaYvFue8GAlIn00vG+r2GuII8Ex0Feya/DZM1wbQ5iZunC
  cBmm8Cc9M0x/ZyIwiR+EwncnPjxjig2E/Oi8Px13czxUESWX80+PcI1OgFETUTQm
  kwIDAQAB
  -----END PUBLIC KEY-----</code></pre>
  </div>
  </div>
  </p>
  <p>I would like a shorter key between 34 and 50 max length, I don't know which format could I use
  to get to this size.</p>