@Test void succeedsIfDeserializationOfInfinityPublicKeyIsCorrect() { MikuliPublicKey infinityPublicKey = new MikuliPublicKey(new G1Point()); byte[] pointBytes = new byte[48]; pointBytes[0] = (byte) 0xc0; Bytes infinityBytesSsz = SSZ.encode( writer -> { writer.writeFixedBytes(Bytes.wrap(pointBytes)); }); MikuliPublicKey deserializedPublicKey = MikuliPublicKey.fromBytesCompressed(infinityBytesSsz); assertEquals(infinityPublicKey, deserializedPublicKey); }
public static MikuliPublicKey fromBytesCompressed(byte[] bytes) { return MikuliPublicKey.fromBytesCompressed(Bytes.wrap(bytes)); }
MikuliPublicKey implements PublicKey { public static MikuliPublicKey fromBytesCompressed(byte[] bytes) { return MikuliPublicKey.fromBytesCompressed(Bytes.wrap(bytes)); } }
MikuliPublicKey implements PublicKey { public static MikuliPublicKey fromBytesCompressed(byte[] bytes) { return MikuliPublicKey.fromBytesCompressed(Bytes.wrap(bytes)); } MikuliPublicKey(MikuliSecretKey secretKey);  MikuliPublicKey(G1Point point);  MikuliPublicKey(Bytes rawData); }
MikuliPublicKey implements PublicKey { public static MikuliPublicKey fromBytesCompressed(byte[] bytes) { return MikuliPublicKey.fromBytesCompressed(Bytes.wrap(bytes)); } MikuliPublicKey(MikuliSecretKey secretKey);  MikuliPublicKey(G1Point point);  MikuliPublicKey(Bytes rawData); static MikuliPublicKey random(final SecureRandom srng); static MikuliPublicKey random(int entropy); static MikuliPublicKey aggregate(List<MikuliPublicKey> keys); static MikuliPublicKey fromBytesCompressed(byte[] bytes); static MikuliPublicKey fromBytesCompressed(Bytes bytes); MikuliPublicKey combine(MikuliPublicKey pk); @Override Bytes48 toBytesCompressed(); G1Point g1Point(); @Override void forceValidation(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); }
MikuliPublicKey implements PublicKey { public static MikuliPublicKey fromBytesCompressed(byte[] bytes) { return MikuliPublicKey.fromBytesCompressed(Bytes.wrap(bytes)); } MikuliPublicKey(MikuliSecretKey secretKey);  MikuliPublicKey(G1Point point);  MikuliPublicKey(Bytes rawData); static MikuliPublicKey random(final SecureRandom srng); static MikuliPublicKey random(int entropy); static MikuliPublicKey aggregate(List<MikuliPublicKey> keys); static MikuliPublicKey fromBytesCompressed(byte[] bytes); static MikuliPublicKey fromBytesCompressed(Bytes bytes); MikuliPublicKey combine(MikuliPublicKey pk); @Override Bytes48 toBytesCompressed(); G1Point g1Point(); @Override void forceValidation(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }