briansmith / ring

Safe, fast, small crypto using Rust
Other
3.64k stars 683 forks source link

aes-gcm: Do all error checking early in `gcm::Context::new`. #2049

Closed briansmith closed 2 months ago

briansmith commented 2 months ago

Do all the error checking before calling any extern functions in gcm::Context::new. This lets the compiler optimize the callers of gcm::Context::new better.