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

Constrain signature to bytes #10

Merged
merged 1 commit into from
Mar 29, 2022
Merged

Constrain signature to bytes #10

merged 1 commit into from
Mar 29, 2022

Conversation

clehner
Copy link
Contributor

@clehner clehner commented Mar 28, 2022

This is needed for spruceid/cacao-zcap#1 to be able to (de)serialize a signature of an arbitrary CACAO.
There's some overlap with this and #7 (which constrains the signature to be DagCbor encodable/decodable).

@@ -87,10 +87,23 @@ pub enum VerificationError {
NotCurrentlyValid,
}

pub struct BasicSignature<S> {
pub struct BasicSignature<S: AsRef<[u8]> + TryFrom<Vec<u8>>> {
Copy link
Member

@chunningham chunningham Mar 29, 2022

Choose a reason for hiding this comment

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

Makes sense according to the spec 👍, I would prefer to avoid the S :DagCbor bound in #7, but its not possible I think :(

@chunningham chunningham merged commit c48b68f into main Mar 29, 2022
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