-
Notifications
You must be signed in to change notification settings - Fork 160
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
Get NonceSize from the algorithm #622
Comments
Nonce size is available as The |
@tarcieri Yeah. I can see the |
<Aes256Gcm as AeadCore>::NonceSize::USIZE |
@tarcieri Thank you! Works perfectly: use aes_gcm::aead::Aead;
use aes_gcm::aes::cipher::Unsigned;
use aes_gcm::AeadCore;
let nonce_size = <aes_gcm::Aes256Gcm as AeadCore>::NonceSize::USIZE; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is it reasonable to add a method
nonce_size()
to algorithms likeAes256Gcm
?Usage:
To avoid inline magic numbers (12 in this case).
The text was updated successfully, but these errors were encountered: