Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group similar methods using traits #60

Closed
fjarri opened this issue Nov 18, 2023 · 1 comment
Closed

Group similar methods using traits #60

fjarri opened this issue Nov 18, 2023 · 1 comment
Labels
code quality Making things simpler
Milestone

Comments

@fjarri
Copy link
Member

fjarri commented Nov 18, 2023

Consider RPParamsMod that has three methods commit(), commit_wide() and commit_xwide() which do the same thing, but with different types of integers as arguments. Instead, we can have a Commit trait with different associated types. The same applies e.g. for Ciphertext constructors.

@fjarri fjarri added the code quality Making things simpler label Nov 18, 2023
@fjarri fjarri added this to the v0.2.0 milestone Nov 26, 2023
@fjarri fjarri modified the milestones: v0.2.0, v1.0.0 Oct 26, 2024
@fjarri
Copy link
Member Author

fjarri commented Dec 3, 2024

Doesn't seem to be possible within the Rust type system since e.g. PaillierParams::Uint and PaillierParams::WideUint may be the same type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Making things simpler
Projects
None yet
Development

No branches or pull requests

1 participant