public static Bytes getEncodedBytes(final ECPoint ecPoint) {
    final Bytes xBytes = Bytes32.wrap(BigIntegers.asUnsignedByteArray(32, ecPoint.getAffineX()));
    final Bytes yBytes = Bytes32.wrap(BigIntegers.asUnsignedByteArray(32, ecPoint.getAffineY()));
    return Bytes.concatenate(xBytes, yBytes);
  }
Gets encoded bytes.

@param ecPoint the ec point
@return the encoded bytes
crypto/algorithms/src/main/java/org/hyperledger/besu/crypto/ECPointUtil.java