Skip to content

CatalystSignedDocument signing logic #162

@Mr-Leshiy

Description

@Mr-Leshiy

Summary

Implement a signing logic for the CatalystSignedDocument object.

Description

  • Inside Content::new method add content: Vec<u8> validation based on the ContentType.
    something like this
match content_type {
ContentType::Json =>  serde_json::from_slice::<serde_json::Value>(&content)?,
ContentType::Cbor => minicbor::decode::<minicbor::data::Token>(&content)?,
}
  • Add a new method verify for CatalystSignedDocument struct. which will verify the underlying signatures and all underlying Uuid types (do the conform to the v7 or v4 versions).
pub fn verify(&self, pk_getter: &impl Fn(&Kid) -> VerifyingKey) -> Result<(), ProblemReport>
  • Add a new method sign for CatalystSignedDocument struct. Which will add a new signature.
pub fn sign(&self, sk: SecretKey, kid: Kid);
  • some unit tests

Metadata

Metadata

Assignees

Labels

Type

Projects

Status

🔬 Ready For QA

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions