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

Make more use of DapRole enums #728

Merged
merged 4 commits into from
Nov 28, 2024
Merged

Conversation

mendess
Copy link
Collaborator

@mendess mendess commented Nov 27, 2024

The DapRole enum is underused and under featured, leading to code like is_leader: bool where an instance of the enum would make calling code more readable (there are places where false /* helper */ can be see where DapRole::Helper would be much better)

This PR also factors out the calculation of the info and aad parameters needed for hpke encryption and decryption. Making this part both more type safe and taking it out of higher level code

This PR should be reviewed one commit at a time

@mendess mendess self-assigned this Nov 27, 2024
@mendess mendess force-pushed the mendess/replace-is-leader-bool branch 2 times, most recently from bcfeb62 to 596fc75 Compare November 27, 2024 15:32
Base automatically changed from mendess/remove-report-initializer to main November 27, 2024 16:06
@mendess mendess force-pushed the mendess/replace-is-leader-bool branch from b12f3be to 4d064b8 Compare November 27, 2024 18:07
@mendess mendess force-pushed the mendess/replace-is-leader-bool branch from 4d064b8 to 5ef0e50 Compare November 27, 2024 18:13
@mendess mendess marked this pull request as ready for review November 27, 2024 18:48
crates/daphne/src/hpke.rs Outdated Show resolved Hide resolved
@mendess mendess force-pushed the mendess/replace-is-leader-bool branch from 5ef0e50 to 51b8b34 Compare November 28, 2024 09:37
@mendess mendess merged commit 8be8c80 into main Nov 28, 2024
3 checks passed
@mendess mendess deleted the mendess/replace-is-leader-bool branch November 28, 2024 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants