identity_eddsa_verifier/
eddsa_verifier.rsuse identity_jose::jwk::Jwk;
use identity_jose::jws::JwsVerifier;
use identity_jose::jws::SignatureVerificationError;
use identity_jose::jws::SignatureVerificationErrorKind;
use identity_jose::jws::VerificationInput;
#[derive(Debug)]
#[non_exhaustive]
pub struct EdDSAJwsVerifier;
impl Default for EdDSAJwsVerifier {
fn default() -> Self {
Self
}
}
impl JwsVerifier for EdDSAJwsVerifier {
#[allow(unused_variables)]
fn verify(&self, input: VerificationInput, public_key: &Jwk) -> std::result::Result<(), SignatureVerificationError> {
match input.alg {
#[cfg(feature = "ed25519")]
identity_jose::jws::JwsAlgorithm::EdDSA => crate::Ed25519Verifier::verify(input, public_key),
_ => Err(SignatureVerificationErrorKind::UnsupportedAlg.into()),
}
}
}