cryptimeleon/math

registerProvider is misleading

Closed this issue · 2 comments

The BilinearGroupFactory.registerProvider method is misleading since it takes a list of providers but its name (singular provider) suggests it would only take a single provider. Furthermore, it does not do what it javadoc says which is adding external providers; instead it just overwrites the providers.

I suggest to rename the method to setProviders and keep it the same otherwise (and adjust javadoc of course).
Also, the provider attribute should be rename accordingly.

I'm creating an issue for this since it would be an API change (and to not forget about it).

This problem would be addressed by removing the whole bilinear group factory class as proposed here.

Closed by #36