-
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
eax: Allow variable tag length #231
Conversation
Codecov Report
@@ Coverage Diff @@
## master #231 +/- ##
==========================================
- Coverage 83.40% 83.22% -0.18%
==========================================
Files 31 31
Lines 1115 1121 +6
==========================================
+ Hits 930 933 +3
- Misses 185 188 +3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a temporary solution it looks good to me, but in future I would prefer to have the "hazmat" methods discussed in the parent issue.
eax/src/traits.rs
Outdated
|
||
impl TagSize for U1 {} | ||
impl TagSize for U2 {} | ||
impl TagSize for U3 {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure we want to allow such short tags? Also I think it should be possible to specify a range bound using typenum
without introducing the sealed trait (see typenum::type_operators
), though the current approach is simple and easier to understand, so we can leave it as-is.
Implemented analogous to ccm by passing a second generic argument to Eax.
I changed the TagSize to be |
@Flakebi LGTM, and matches the |
Implemented analogous to ccm by passing a second generic argument to
Eax.
Fixes #220.
This change should be mostly backwards compatible, apart from exporting the generic Tag instead of
pub type Tag = GenericArray<u8, U16>;
It should be easy to make keep it completely backwards compatible if that’s better.