title: Error: Bad Base64Coder input character
body: <p>I am currently facing an error called <code>Bad Base64Coder input character at ...</code><br>
  Here is my code in java.</p>
  
  <pre><code>String nonce2 = strNONCE;
  byte[] nonceBytes1 = Base64Coder.decode(nonce2);                                     
  System.out.println("nonceByte1 value : " + nonceBytes1);
  </code></pre>
  
  <p>The problem now is I get <code>Bad Base64Coder input character</code> error and the <code>nonceBytes1</code> value is printed as null. I am trying to decode the <code>nonce2</code> from <code>Base64Coder</code>. My <code>strNONCE</code> value is 16</p>
  
  <p><code>/** Generating nonce value */
  public static String generateNonce() { 
    try {
          byte[] nonce = new byte[16]; 
          Random rand; 
          rand = SecureRandom.getInstance ("SHA1PRNG"); 
          rand.nextBytes(nonce); 
          //convert byte array to string. 
          strNONCE = new String(nonce); 
         }catch (NoSuchAlgorithmException e) { 
         // TODO Auto-generated catch block 
         e.printStackTrace(); 
         } 
    return strNONCE; 
  }</code></p>