How to convert a Java BigInteger constant (encoded as base64) to Python?
<p>Given the following Java code:</p>

<pre><code>import java.math.BigInteger;
import java.util.Base64;
...
String myvar64 = "AQAB";  // assume this is much longer..
byte[] myvarB = Base64.getDecoder().decode(myvar64);
BigInteger myvar = new BigInteger(1, myvarB);
</code></pre>

<p>how do you convert the code to python?</p>

<p>I'm assuming the Java code is written that way because Java doesn't have bigint literals (I don't know much java..)  If so I'm assuming a simple assignment is sufficient (perhaps with a code comment indicating the original source string):</p>

<pre><code>myvar = 65537  # int("AQAB".decode('base64').encode('hex'), 16)
</code></pre>