public static String Base58ToHexString(String str, int laenge)
{
char[] ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz".toCharArray();
char[] a = str.toCharArray();
BigInteger erg = new BigInteger("0");
BigInteger b58 = new BigInteger("58");
int e = a.length-1;
for(int j=0;j {
for(int i=0;i {
if(a[j]==ALPHABET[i])
{
BigInteger I = new BigInteger(String.valueOf(i));
erg = erg.add(I.multiply(b58.pow(e)));
}
}
e--;
}
char[] c = erg.toString().toCharArray();
int nullLaenge = 0;
for(int i=0; a[i]=='1' && i char[] EINS = {'0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0'};
char[] KeyOut = new char[nullLaenge + c.length];
System.arraycopy(c, 0, KeyOut, nullLaenge, c.length);
System.arraycopy(EINS, 0, KeyOut, 0, nullLaenge);
String out = new String(KeyOut);
BigInteger big = new BigInteger(out,10);
out = big.toString(16);
String nullen = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
out = nullen+out;
return out.substring(out.length()-laenge);
}