Uh oh!
There was an error while loading. Please reload this page.
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.
|
newpavlov
left a comment
There was a problem hiding this comment.
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.
| impl TagSize for U1 {} | ||
| impl TagSize for U2 {} | ||
| impl TagSize for U3 {} |
There was a problem hiding this comment.
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.
Flakebi
commented
Oct 18, 2020
I changed the TagSize to be |
tarcieri
commented
Oct 18, 2020
@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.