@Test public void testVerifyPrivateKey() { assertTrue(Keys.verifyPrivateKey( "0x02b8f18d92354b055bd02cd51449b05b7b97104931f10485d1df905e4e70fbca")); assertTrue(Keys.verifyPrivateKey( "0X02b8f18d92354b055bd02cd51449b05b7b97104931f10485d1df905e4e70fbca")); assertTrue(Keys.verifyPrivateKey( "02b8f18d92354b055bd02cd51449b05b7b97104931f10485d1df905e4e70fbca")); assertFalse(Keys.verifyPrivateKey( "x02b8f18d92354b055bd02cd51449b05b7b97104931f10485d1df905e4e70fbca")); assertFalse(Keys.verifyPrivateKey( "00k2b8f18d92354b055bd02cd51449b05b7b97104931f10485d1df905e4e70fbca")); assertFalse(Keys.verifyPrivateKey( "h2b8f18d92354b055bd02cd51449b05b7b97104931f10485d1df905e4e70fbca")); }
public static boolean verifyPrivateKey(String privateKey) { return privateKey.matches(PRIVATE_KEY_REGEX); }
Keys { public static boolean verifyPrivateKey(String privateKey) { return privateKey.matches(PRIVATE_KEY_REGEX); } }
Keys { public static boolean verifyPrivateKey(String privateKey) { return privateKey.matches(PRIVATE_KEY_REGEX); } private  Keys(); }
Keys { public static boolean verifyPrivateKey(String privateKey) { return privateKey.matches(PRIVATE_KEY_REGEX); } 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 boolean verifyPrivateKey(String privateKey) { return privateKey.matches(PRIVATE_KEY_REGEX); } 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; }