PublicKey { public byte[] getRaw() { return this.value.clone(); } PublicKey(BigInteger integer);  PublicKey(byte[] bytes); static PublicKey fromHexString(String hex); byte[] getRaw(); String getHexString();  }
@Test public void success_GeneratePublicKey_from_HexString1() { String hexString = "1fc6fb11ff9568dabc41a48b6bf3b808e84be58c0df4a881"; PublicKey publicKey = new PublicKey(HexEncoder.getBytes(hexString)); assertThat(HexEncoder.getString(publicKey.getRaw()), is(hexString)); }
@Test public void success_GeneratePublicKey_from_BigInteger() { BigInteger integer = new BigInteger("12345678990"); PublicKey publicKey = new PublicKey(integer); assertThat(publicKey.getRaw(), is(integer.toByteArray())); }