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.
```
// 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...)
```
The original PR: https://github.com/keep-network/paillier/pull/5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
PublicKey.Addaccepts now an arbitrary number of*Cyphers. Previously, it was possible to add only two*Cypherinstances 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
*Cypherarguments, so every project referencing the library will observe no compilation issues.The original PR: https://github.com/keep-network/paillier/pull/5
Thousand thanks for that one. Sorry for delay, I forgot about it.
cheers,
didier