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

Consolidate API names related to Key #161

Merged
merged 6 commits into from
Aug 1, 2023
Merged

Consolidate API names related to Key #161

merged 6 commits into from
Aug 1, 2023

Conversation

qmuntal
Copy link
Contributor

@qmuntal qmuntal commented Jul 24, 2023

This PR contain the following changes:

  • Renamed NewXKey to NewKeyX, being X the key type. This form is more idiomatic.
  • Removed the Key prefix from Key properties. It is go-ish to avoid prefixing the name of a property with the name of the struct.
  • Rename XInvalid to XReserved, being X KeyType, Curve, KeyOp and Algorithm. This makes our API more similar to the COSE spec naming.
  • Added some tests and spec pointers.

Signed-off-by: qmuntal <qmuntaldiaz@microsoft.com>
Signed-off-by: qmuntal <qmuntaldiaz@microsoft.com>
Signed-off-by: qmuntal <qmuntaldiaz@microsoft.com>
Signed-off-by: qmuntal <qmuntaldiaz@microsoft.com>
Signed-off-by: qmuntal <qmuntaldiaz@microsoft.com>
Signed-off-by: qmuntal <qmuntaldiaz@microsoft.com>
@codecov
Copy link

codecov bot commented Jul 24, 2023

Codecov Report

Merging #161 (adad1c2) into main (a5dc571) will increase coverage by 0.20%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #161      +/-   ##
==========================================
+ Coverage   93.59%   93.80%   +0.20%     
==========================================
  Files          11       11              
  Lines        1687     1695       +8     
==========================================
+ Hits         1579     1590      +11     
+ Misses         75       72       -3     
  Partials       33       33              
Impacted Files Coverage Δ
algorithm.go 100.00% <100.00%> (+14.63%) ⬆️
headers.go 92.19% <100.00%> (-0.91%) ⬇️
key.go 95.94% <100.00%> (+0.03%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@yogeshbdeshpande yogeshbdeshpande left a comment

Choose a reason for hiding this comment

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

LGTM!

@qmuntal
Copy link
Contributor Author

qmuntal commented Jul 31, 2023

PTAL @thomas-fossati @shizhMSFT

@yogeshbdeshpande
Copy link
Contributor

PTAL @thomas-fossati @shizhMSFT

@qmuntal : Thomas is on a long vacation. Please get the necessary comments from @shizhMSFT and then proceed with submission.

Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

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

LGTM

@qmuntal qmuntal merged commit 160b7e0 into main Aug 1, 2023
6 checks passed
@qmuntal qmuntal deleted the refactorkey branch August 1, 2023 09:24
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.

4 participants