-
Notifications
You must be signed in to change notification settings - Fork 157
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
generic array / stream encryptor type mismatch #542
Comments
The nonce size for See also RustCrypto/traits#1306 |
I assumed it's somehow generic over the cipher's NonceSize due to these definitions: pub type Nonce<A, S> = GenericArray<u8, NonceSize<A, S>>; pub type NonceSize<A, S> = <<A as AeadCore>::NonceSize as Sub<<S as StreamPrimitive>::NonceOverhead>>::Output; Does that mean there is currently no stream::Encryptor that can be used with XChaCha20Poly1305? |
No, it just means you're passing the wrong nonce size. You need to use You can use those type aliases if you'd like, but right now you're using |
Ah, I see, thanks for the quick clarification! |
The following code
produces the following error:
Here's a repository with this example:
https://github.com/ousado/xcc20poly1305issue/blob/main/src/main.rs
The text was updated successfully, but these errors were encountered: