Skip to content
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

BER Tag Helper Function #38

Merged
merged 6 commits into from
Oct 10, 2024
Merged

BER Tag Helper Function #38

merged 6 commits into from
Oct 10, 2024

Conversation

OmegaRelay
Copy link
Contributor

This PR adds a helper function to create new ANS.1 BER standard tags using the number and class of the tag:

NewBERTag(number uint, class Class) Tag

Additionally

  • Updated the Class() method to support tags longer than 1 byte
  • Constructed bit is set in EncodeBER() for TLVs with child TLVs

@OmegaRelay OmegaRelay requested a review from stv0g as a code owner October 10, 2024 07:00
@OmegaRelay OmegaRelay changed the title BER Tag help function BER Tag Helper Function Oct 10, 2024
Signed-off-by: Theis <theismejnertsen@gmail.com>
…er than 1 byte

Signed-off-by: Theis <theismejnertsen@gmail.com>
…during encoding if tlv has child tlvs

Signed-off-by: Theis <theismejnertsen@gmail.com>
Signed-off-by: Theis <theismejnertsen@gmail.com>
…alue

Signed-off-by: Theis <theismejnertsen@gmail.com>
Signed-off-by: Theis <theismejnertsen@gmail.com>
Copy link
Member

@stv0g stv0g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot :)

Copy link

codecov bot commented Oct 10, 2024

Codecov Report

Attention: Patch coverage is 95.83333% with 1 line in your changes missing coverage. Please review.

Project coverage is 34.46%. Comparing base (bd70605) to head (cc3d9e4).
Report is 43 commits behind head on main.

Files with missing lines Patch % Lines
encoding/tlv/ber.go 95.83% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #38      +/-   ##
==========================================
- Coverage   36.70%   34.46%   -2.25%     
==========================================
  Files          25       27       +2     
  Lines        1531     1651     +120     
==========================================
+ Hits          562      569       +7     
- Misses        896     1022     +126     
+ Partials       73       60      -13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@stv0g stv0g merged commit 2c0452e into cunicu:main Oct 10, 2024
6 of 7 checks passed
@OmegaRelay OmegaRelay deleted the tag-help-function branch October 11, 2024 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants