-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add method to get a BER encoded tag's number #39
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #39 +/- ##
==========================================
- Coverage 36.70% 35.04% -1.67%
==========================================
Files 25 27 +2
Lines 1531 1672 +141
==========================================
+ Hits 562 586 +24
- Misses 896 1026 +130
+ Partials 73 60 -13 ☔ View full report in Codecov by Sentry. |
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.
Great addition 👍 I like it. What do you think about naming it just Number()
? The tags number alone isn't BER specific, or is it?
It happens just that we use the BER encoding to for our internal representation for a Tag in a uint
. We could also have used a struct, but decided for a unit as it's easier to declare a large set if tags as it happens in a lot of SmartCard applications.
Thanks for reviewing. Alternatively, we could seperate tag types where only the BERTag type implements the Number(), Class() and IsContstructed() methods? |
…BER tag Signed-off-by: Theis <[email protected]>
I see. Thanks for your contribution :) |
Hello, this commit adds a method to get the tag number from a BER encoded tag, and modifies the tag test to include the new method.
Let me know what you think :)