title: base64 Encoder via crypto-js
body: <p><strong>I want to Encode number to character.</strong> </p>
  
  <ul>
  <li>How Can I encode to base64 in output?</li>
  </ul>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>const CryptoJS = require('crypto-js');
  
  function msg() {
    return '7543275'; // I want to encrypt this number to character
  }
  
  const msgLocal = msg();
  
  // Encrypt
  const ciphertext = CryptoJS.AES.encrypt(msgLocal, 'password');
  
  // Decrypt
  const bytes = CryptoJS.AES.decrypt(ciphertext.toString(), 'password');
  const plaintext = bytes.toString(CryptoJS.enc.Utf8);
  
  console.log(plaintext);
  </code></pre>