@Test public void testGetAddressZeroPadded() { byte[] address = Keys.getAddress( Numeric.toBytesPadded(BigInteger.valueOf(0x1234), Keys.PUBLIC_KEY_SIZE)); String expected = Numeric.toHexStringNoPrefix(address); String value = "1234"; assertThat(Keys.getAddress("0x" + Strings.zeros(Keys.PUBLIC_KEY_LENGTH_IN_HEX - value.length()) + value), equalTo(expected)); }
public static String getAddress(ECKeyPair ecKeyPair) { return getAddress(ecKeyPair.getPublicKey()); }
Keys { public static String getAddress(ECKeyPair ecKeyPair) { return getAddress(ecKeyPair.getPublicKey()); } }
Keys { public static String getAddress(ECKeyPair ecKeyPair) { return getAddress(ecKeyPair.getPublicKey()); } private  Keys(); }
Keys { public static String getAddress(ECKeyPair ecKeyPair) { return getAddress(ecKeyPair.getPublicKey()); } private  Keys(); static ECKeyPair createEcKeyPair(); static String getAddress(ECKeyPair ecKeyPair); static String getAddress(BigInteger publicKey); static String getAddress(String publicKey); static byte[] getAddress(byte[] publicKey); static byte[] serialize(ECKeyPair ecKeyPair); static ECKeyPair deserialize(byte[] input); static boolean verifyAddress(String address); static boolean verifyPrivateKey(String privateKey); }
Keys { public static String getAddress(ECKeyPair ecKeyPair) { return getAddress(ecKeyPair.getPublicKey()); } private  Keys(); static ECKeyPair createEcKeyPair(); static String getAddress(ECKeyPair ecKeyPair); static String getAddress(BigInteger publicKey); static String getAddress(String publicKey); static byte[] getAddress(byte[] publicKey); static byte[] serialize(ECKeyPair ecKeyPair); static ECKeyPair deserialize(byte[] input); static boolean verifyAddress(String address); static boolean verifyPrivateKey(String privateKey); static final int ADDRESS_SIZE; static final int ADDRESS_LENGTH_IN_HEX; static final int PRIVATE_KEY_LENGTH_IN_HEX; }