@Test void succeedsWhenAggregatingASingleSignatureReturnsTheSameSignature() { BLSSignature signature = BLSSignature.random(1); assertEquals(signature, BLS.aggregate(singletonList(signature))); }
public static BLSSignature aggregate(List<BLSSignature> signatures) throws IllegalArgumentException { checkArgument(signatures.size() > 0, "Aggregating zero signatures is invalid."); return new BLSSignature( getBlsImpl() .aggregateSignatures( signatures.stream().map(BLSSignature::getSignature).collect(Collectors.toList()))); }
BLS { public static BLSSignature aggregate(List<BLSSignature> signatures) throws IllegalArgumentException { checkArgument(signatures.size() > 0, "Aggregating zero signatures is invalid."); return new BLSSignature( getBlsImpl() .aggregateSignatures( signatures.stream().map(BLSSignature::getSignature).collect(Collectors.toList()))); } }
BLS { public static BLSSignature aggregate(List<BLSSignature> signatures) throws IllegalArgumentException { checkArgument(signatures.size() > 0, "Aggregating zero signatures is invalid."); return new BLSSignature( getBlsImpl() .aggregateSignatures( signatures.stream().map(BLSSignature::getSignature).collect(Collectors.toList()))); }  }
BLS { public static BLSSignature aggregate(List<BLSSignature> signatures) throws IllegalArgumentException { checkArgument(signatures.size() > 0, "Aggregating zero signatures is invalid."); return new BLSSignature( getBlsImpl() .aggregateSignatures( signatures.stream().map(BLSSignature::getSignature).collect(Collectors.toList()))); }  static void setBlsImplementation(BLS12381 blsImpl); static void resetBlsImplementation(); static BLSSignature sign(BLSSecretKey secretKey, Bytes message); static boolean verify(BLSPublicKey publicKey, Bytes message, BLSSignature signature); static BLSSignature aggregate(List<BLSSignature> signatures); static boolean aggregateVerify(
      List<BLSPublicKey> publicKeys, List<Bytes> messages, BLSSignature signature); static boolean fastAggregateVerify(
      List<BLSPublicKey> publicKeys, Bytes message, BLSSignature signature); static boolean batchVerify(
      List<List<BLSPublicKey>> publicKeys, List<Bytes> messages, List<BLSSignature> signatures); static boolean batchVerify(
      List<List<BLSPublicKey>> publicKeys,
      List<Bytes> messages,
      List<BLSSignature> signatures,
      boolean doublePairing,
      boolean parallel); static BatchSemiAggregate prepareBatchVerify(
      int index, List<BLSPublicKey> publicKeys, Bytes message, BLSSignature signature); static BatchSemiAggregate prepareBatchVerify2(
      int index,
      List<BLSPublicKey> publicKeys1,
      Bytes message1,
      BLSSignature signature1,
      List<BLSPublicKey> publicKeys2,
      Bytes message2,
      BLSSignature signature2); static boolean completeBatchVerify(List<BatchSemiAggregate> preparedSignatures); static BLSSignature sign(BLSSecretKey secretKey, Bytes message, Bytes dst); static boolean verify(
      BLSPublicKey publicKey, Bytes message, BLSSignature signature, Bytes dst); }
BLS { public static BLSSignature aggregate(List<BLSSignature> signatures) throws IllegalArgumentException { checkArgument(signatures.size() > 0, "Aggregating zero signatures is invalid."); return new BLSSignature( getBlsImpl() .aggregateSignatures( signatures.stream().map(BLSSignature::getSignature).collect(Collectors.toList()))); }  static void setBlsImplementation(BLS12381 blsImpl); static void resetBlsImplementation(); static BLSSignature sign(BLSSecretKey secretKey, Bytes message); static boolean verify(BLSPublicKey publicKey, Bytes message, BLSSignature signature); static BLSSignature aggregate(List<BLSSignature> signatures); static boolean aggregateVerify(
      List<BLSPublicKey> publicKeys, List<Bytes> messages, BLSSignature signature); static boolean fastAggregateVerify(
      List<BLSPublicKey> publicKeys, Bytes message, BLSSignature signature); static boolean batchVerify(
      List<List<BLSPublicKey>> publicKeys, List<Bytes> messages, List<BLSSignature> signatures); static boolean batchVerify(
      List<List<BLSPublicKey>> publicKeys,
      List<Bytes> messages,
      List<BLSSignature> signatures,
      boolean doublePairing,
      boolean parallel); static BatchSemiAggregate prepareBatchVerify(
      int index, List<BLSPublicKey> publicKeys, Bytes message, BLSSignature signature); static BatchSemiAggregate prepareBatchVerify2(
      int index,
      List<BLSPublicKey> publicKeys1,
      Bytes message1,
      BLSSignature signature1,
      List<BLSPublicKey> publicKeys2,
      Bytes message2,
      BLSSignature signature2); static boolean completeBatchVerify(List<BatchSemiAggregate> preparedSignatures); static BLSSignature sign(BLSSecretKey secretKey, Bytes message, Bytes dst); static boolean verify(
      BLSPublicKey publicKey, Bytes message, BLSSignature signature, Bytes dst);  }