Auto Added by WPeMatico

What is base58Prefixes in Bitcion?

what is base58Prefixes[SCRIPT_ADDRESS] ? when we use it ? base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,5); How to generate value base58Prefixes[SECRET_KEY], base58Prefixes[EXT_PUBLIC_KEY], base58Prefixes[EXT_SECRET_KEY? base58Prefixes[SECRET_KEY] = std::vector<unsigned char>(1,128); base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x88, 0xB2, 0x1E}; base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x88, 0xAD, 0xE4};

Continue Reading What is base58Prefixes in Bitcion?

Why does my implementation of hex to Base58check produce different results than the example?

Step 8 of this wiki page gives this hex value: 00010966776006953D5567439E5E39F86A0D273BEED61967F6 Step 9 converts it to this base58 string:16UwLL9Risc3QfPqBUvKofHmBQ7wMtjvM I'm trying to implement the conversion function using the pseudocode from this wiki page. This is my implementation (in Java): String input = "00010966776006953D5567439E5E39F86A0D273BEED61967F6" BigInteger bigInteger = new BigInteger(input , 16); String code_string = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; StringBuilder output = new StringBuilder(); while(bigInteger.compareTo(BigInteger.ZERO) == 1){ BigInteger[] divAndRemainder = bigInteger.divideAndRemainder(BigInteger.valueOf(58)); output.append(code_string.charAt(divAndRemainder[1].intValue())); bigInteger = divAndRemainder[0]; } int i=0; while(concat.charAt(i) == '0'){ i++; output.append(code_string.charAt(0)); } System.out.println(output.reverse()); This prints out 1116UwLL9Risc3QfPqBUvKofHmBQ7wMtjvM. This is close to what the wiki page produces, but not quite, there are 2 extra…

Continue Reading Why does my implementation of hex to Base58check produce different results than the example?

End of content

No more pages to load