Closed shizhMSFT closed 2 years ago
Merging #101 (aa2f81c) into main (66b4a5a) will increase coverage by
2.61%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## main #101 +/- ##
==========================================
+ Coverage 89.48% 92.10% +2.61%
==========================================
Files 10 10
Lines 1018 975 -43
==========================================
- Hits 911 898 -13
+ Misses 72 51 -21
+ Partials 35 26 -9
Impacted Files | Coverage Δ | |
---|---|---|
signer.go | 100.00% <ø> (ø) |
|
verifier.go | 100.00% <ø> (ø) |
|
algorithm.go | 100.00% <100.00%> (+3.44%) |
:arrow_up: |
ecdsa.go | 95.89% <100.00%> (+19.32%) |
:arrow_up: |
ed25519.go | 100.00% <100.00%> (ø) |
|
rsa.go | 100.00% <100.00%> (+25.00%) |
:arrow_up: |
sign.go | 88.93% <100.00%> (+1.03%) |
:arrow_up: |
sign1.go | 86.86% <100.00%> (+1.75%) |
:arrow_up: |
headers.go | 93.05% <0.00%> (+0.90%) |
:arrow_up: |
... and 2 more |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
If I'm not mistaken, one could previously register a custom algorithm and reuse the built-in signers. This PR removes this capability. Is this intentional?
If I'm not mistaken, one could previously register a custom algorithm and reuse the built-in signers. This PR removes this capability. Is this intentional?
Previously, we needed to register the external algorithm to access hash algorithms. Now, we don't need them since the digests are computed by the Signer
and the Verifier
.
External algorithm implementors can implement the Signer
and Verifier
interfaces and can be used by go-cose
directly without any registration. Here's an example implementation.
If I'm not mistaken, one could previously register a custom algorithm and reuse the built-in signers. This PR removes this capability. Is this intentional?
Previously, we needed to register the external algorithm to access hash algorithms. Now, we don't need them since the digests are computed by the
Signer
and theVerifier
.External algorithm implementors can implement the
Signer
andVerifier
interfaces and can be used bygo-cose
directly without any registration. Here's an example implementation.
You are right, I though a caller could instantiate a built-in signer with a custom algorithm, but it is not possible, so we are fine 😄 .
Resolves #100
Changes:
Sign()
in theSigner
interface accepts message content instead of digest.Verify()
in theVerifier
interface accepts message content instead of digest.