Skip to content

Instantly share code, notes, and snippets.

Dev Random devrandom

Block or report user

Report or block devrandom

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@devrandom
devrandom / HDUtil.java
Created Dec 5, 2014 — forked from anonymous/HDUtil.java
Parse Bitcoin extended keys
View HDUtil.java
public class HDUtil {
private static final byte[] xprv = new byte[]{0x04, (byte) 0x88, (byte) 0xAD, (byte) 0xE4};
private static final byte[] xpub = new byte[]{0x04, (byte) 0x88, (byte) 0xB2, (byte) 0x1E};
private static final byte[] tprv = new byte[]{0x04, (byte) 0x35, (byte) 0x83, (byte) 0x94};
private static final byte[] tpub = new byte[]{0x04, (byte) 0x35, (byte) 0x87, (byte) 0xCF};
public static DeterministicKey parseDeterministicKey(String serialized) throws AddressFormatException {
byte[] data = Base58.decodeChecked(serialized);
if (data.length != 78) {
You can’t perform that action at this time.