Trait VerificationAlgorithm
pub trait VerificationAlgorithm:
Debug
+ Sync
+ Any
+ Sealed {
// Required methods
fn verify(
&self,
public_key: Input<'_>,
msg: Input<'_>,
signature: Input<'_>,
) -> Result<(), Unspecified>;
fn verify_sig(
&self,
public_key: &[u8],
msg: &[u8],
signature: &[u8],
) -> Result<(), Unspecified>;
fn verify_digest_sig(
&self,
public_key: &[u8],
digest: &Digest,
signature: &[u8],
) -> Result<(), Unspecified>;
}Available on crate feature
crypto only.Expand description
A signature verification algorithm.
Required Methods§
fn verify(
&self,
public_key: Input<'_>,
msg: Input<'_>,
signature: Input<'_>,
) -> Result<(), Unspecified>
👎Deprecated: please use VerificationAlgorithm::verify_sig insteadAvailable on crate feature ring-sig-verify only.
fn verify( &self, public_key: Input<'_>, msg: Input<'_>, signature: Input<'_>, ) -> Result<(), Unspecified>
VerificationAlgorithm::verify_sig insteadring-sig-verify only.Verify the signature signature of message msg with the public key
public_key.
§Errors
error::Unspecified if inputs not verified.
fn verify_sig(
&self,
public_key: &[u8],
msg: &[u8],
signature: &[u8],
) -> Result<(), Unspecified>
fn verify_sig( &self, public_key: &[u8], msg: &[u8], signature: &[u8], ) -> Result<(), Unspecified>
Verify the signature signature of message msg with the public key
public_key.
§Errors
error::Unspecified if inputs not verified.
fn verify_digest_sig(
&self,
public_key: &[u8],
digest: &Digest,
signature: &[u8],
) -> Result<(), Unspecified>
fn verify_digest_sig( &self, public_key: &[u8], digest: &Digest, signature: &[u8], ) -> Result<(), Unspecified>
Verify the signature signature of digest with the public_key.
§Errors
error::Unspecified if inputs not verified.
Trait Implementations§
§impl TryFrom<JWA> for &'static dyn VerificationAlgorithm
impl TryFrom<JWA> for &'static dyn VerificationAlgorithm
§type Error = OpaqueError
type Error = OpaqueError
The type returned in the event of a conversion error.
§fn try_from(
value: JWA,
) -> Result<&'static dyn VerificationAlgorithm, <&'static dyn VerificationAlgorithm as TryFrom<JWA>>::Error>
fn try_from( value: JWA, ) -> Result<&'static dyn VerificationAlgorithm, <&'static dyn VerificationAlgorithm as TryFrom<JWA>>::Error>
Performs the conversion.