public static String generateTestAddress(final String hexPublicKey) throws IllegalArgumentException { checkStringArgument(hexPublicKey); AsymmetricPublicKey publicKey = new AsymmetricPublicKey(hexPublicKey); AsymmetricKeyCreator keyCreator = new AsymmetricKeyCreator(); return keyCreator.createTestAddress(publicKey); }
public static String derivePublicKey(final String hexPrivateKey) throws IllegalArgumentException { checkStringArgument(hexPrivateKey); AsymmetricPrivateKey privateKey = new AsymmetricPrivateKey(new BigInteger(hexPrivateKey, 16)); AsymmetricKeyCreator keyCreator = new AsymmetricKeyCreator(); return keyCreator.createPublicKey(privateKey).toString(); }
public static String createPrivateKey() { AsymmetricKeyCreator keyCreator = new AsymmetricKeyCreator(); return keyCreator.createPrivateKey().toString(); }