title: Android In App Billing crashes only in Samsung tab 10.1
body: <p>I got a very strange problem when I'm testing the In App Billing. The app crashes only in Samsung tab 10.1 with the following error message which I totally have no clue what's wrong with it:</p>
  <blockquote>
  <p>java.lang.IllegalArgumentException: com.d.b.a.b: Bad Base64 input character at 0: 5(decimal)</p>
  <pre><code>   at com.test.iab.util.Security.verifyPurchase()
     at com.test.iab.util.Security.verifyPurchase()
     at com.test.iab.util.IabHelper.enableDebugLogging()
     at com.test.iab.util.IabHelper.enableDebugLogging()
     at com.test.iab.util.IabHelper.enableDebugLogging()
     at com.test.iab.util.IabHelper$2.run()
     at java.lang.Thread.run(Thread.java:856) Caused by: com.d.b.a.b: Bad Base64 input character at 0: 5(decimal)
     at com.test.iab.util.Base64.decode4to3()
     at com.test.iab.util.Base64.decode4to3()
     at com.test.iab.util.Base64.decode4to3()
     at com.test.iab.util.Security.verifyPurchase()
     at com.test.iab.util.Security.verifyPurchase()
     at com.test.iab.util.IabHelper.enableDebugLogging()
     at com.test.iab.util.IabHelper.enableDebugLogging()
     at com.test.iab.util.IabHelper.enableDebugLogging()
     at com.test.iab.util.IabHelper$2.run()
     at java.lang.Thread.run(Thread.java:856)
  </code></pre>
  </blockquote>
  <p>The app works fine in Samsung S4, HTC one and some other devices but only crashes in Samsung tab 10.1. Does anybody have experience the same issue? The reason why I ask here is because I don't have a samsung tablet for debugging.</p>
  <p><strong>EDIT:</strong></p>
  <p>The reason I didn't post the source code is because the source code is from google and I have no idea exactly which code cause the problem. Anyway here is the code possibly related to the problem:</p>
  <pre><code>public static boolean verifyPurchase(String base64PublicKey, String signedData, String signature) {
          if (TextUtils.isEmpty(signedData) || TextUtils.isEmpty(base64PublicKey) ||
                  TextUtils.isEmpty(signature)) {
              Log.e(TAG, &quot;Purchase verification failed: missing data.&quot;);
              return false;
          }
  
          PublicKey key = Security.generatePublicKey(base64PublicKey);
          return Security.verify(key, signedData, signature);
      }
  </code></pre>