PublicKey.Add accepts now an arbitrary number of *Cyphers. Previously, it was possible to add only two *Cypher instances and it was quite unwieldy for a lot of use cases.
The current implementation is backward compatible. It's still possible to pass just two *Cypher arguments, so every project referencing the library will observe no compilation issues.
// backward-compatibility
cypherA := privateKey.Add(cypher1, cypher2)
// you can pass any number of cyphers now
cypherB := privateKey.Add(cypher1, cypher2, cypher3, cypher4)
// or even a slice of them
cyphers := []*Cypher{cypher1, cypher2, cypher3, cypher4}
cypherC := privateKey.Add(cyphers...)
PublicKey.Add
accepts now an arbitrary number of*Cypher
s. Previously, it was possible to add only two*Cypher
instances and it was quite unwieldy for a lot of use cases.The current implementation is backward compatible. It's still possible to pass just two
*Cypher
arguments, so every project referencing the library will observe no compilation issues.The original PR: https://github.com/keep-network/paillier/pull/5