Trait ddoresolver_rs::DdoParser[][src]

pub trait DdoParser {
    fn find_key_agreement(&self, pattern: &str) -> Option<KeyAgreement>;
fn find_public_key_for_curve(&self, curve: &str) -> Option<Vec<u8>>;
fn find_public_key_id_for_curve(&self, curve: &str) -> Option<String>;
fn find_public_key_controller_for_curve(
        &self,
        curve: &str
    ) -> Option<String>; }

Universal trait for DID document parser methods.

Provides method signatures to search through the document for particular elements or public crypto material.

Required methods

fn find_key_agreement(&self, pattern: &str) -> Option<KeyAgreement>[src]

Pattern finding method to resolve KeyAgreement based on provided pattern. Returns None if no matching result found instead of error.

fn find_public_key_for_curve(&self, curve: &str) -> Option<Vec<u8>>[src]

Searches all crypto matherial in the document for particular curve and returns FIRST! match for particular curve, which can be partial pattern. Returns None if no matching result found instead of error.

fn find_public_key_id_for_curve(&self, curve: &str) -> Option<String>[src]

Method similar to find_key_agreement, but returns key ID instead of the key itself. Returns None if no matching result found instead of error.

fn find_public_key_controller_for_curve(&self, curve: &str) -> Option<String>[src]

Resolve controller for specified curve if it’s present in VerificationMethods list Returns None if no matching curve found.

Loading content...

Implementors

Loading content...