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

Improve how the AAD is set #1521

Closed
raphaelrobert opened this issue Feb 29, 2024 · 0 comments · Fixed by #1615
Closed

Improve how the AAD is set #1521

raphaelrobert opened this issue Feb 29, 2024 · 0 comments · Fixed by #1615
Assignees

Comments

@raphaelrobert
Copy link
Member

Currently, the AAD is set permanently at the MlsGroup level. It is persisted and applied to every outgoing message until its value is changed. The intuition is that apps would most likely like to set it per message and don't want it to be persisted, not even in RAM.

Rust doesn't offer an elegant way to handle optional arguments, we could however do the following syntax:

mls_group.with_aad(b"This is the AAD.").add_members(...)?;

Internally, with_aad() would set a temporary AAD field and consume mut self. Any function that sends out messages would honor the AAD field and clear it before returning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant