-
Notifications
You must be signed in to change notification settings - Fork 151
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
[doc] user specified associated data API #224
Comments
All types have a blanket impl of https://docs.rs/aead/0.3.2/aead/struct.Payload.html#impl-From%3CT%3E ...and all types that https://doc.rust-lang.org/std/convert/trait.Into.html#impl-Into%3CU%3E ...so I agree the documentation for |
Ah I see, thanks for the clarification! Understood now, can close the issue. 👍🏻 |
I'll leave it open to track adding better documentation |
hmm... 🤔 the following gives me Err, not sure why // message: &[u8], assoc_data: &u8, nonce and recipient_box is properly constructed.
let ct = recipient_box.encrypt(&nonce,
Payload { msg: &message,
aad: &assoc_data }); Just to double check with you @tarcieri , ☝️ this is the correct way to use update: if I set to reproduce it, see playground here: https://repl.it/repls/OutstandingWildNature#src/lib.rs |
We have this tracking issue open for traits which better reflect constructions like |
so will the team add support for AAD in the near future (if so, mind me asking roughly when)? or this exclusion has some rationale behind?
so basically, |
The design of the The similar |
I see.
that would be great |
I think this was ultimately addressed in #225 |
Currently documentation on
trait aead::Aead
and specific instantiation of AEAD suites only cover how to directly encrypt a message with (by default) an empty associated data field,If I construct my own
Payload
with msg and aad specified, then how to pass to theencrypt()
function is not so clear to me, cuz Payload itself doesn't implementInto<Payload>
.I could be misunderstanding things, but maybe some examples in the documentation would be helpful.
Thanks!
The text was updated successfully, but these errors were encountered: