Trait tendermint::signature::Verifier[][src]

pub trait Verifier<S> where
    S: Signature
{ pub fn verify(&self, msg: &[u8], signature: &S) -> Result<(), Error>; }

Verify the provided message bytestring using Self (e.g. a public key)

Required methods

pub fn verify(&self, msg: &[u8], signature: &S) -> Result<(), Error>[src]

Use Self to verify that the provided signature for a given message bytestring is authentic.

Returns Error if it is inauthentic, or otherwise returns ().

Loading content...

Implementations on Foreign Types

impl<C> Verifier<Signature<C>> for VerifyingKey<C> where
    C: ProjectiveArithmetic + DigestPrimitive + Curve,
    <C as DigestPrimitive>::Digest: Digest,
    GenericArray<u8, <C as Curve>::FieldSize>: From<<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
    GenericArray<u8, <C as Curve>::FieldSize>: for<'r> From<&'r <<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
    <<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar: PrimeField,
    <<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar: FromDigest<C>,
    <<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Copy,
    <<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Clone,
    <<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Debug,
    <<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: VerifyPrimitive<C>,
    <C as ProjectiveArithmetic>::ProjectivePoint: From<<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr>,
    <<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
    <<C as DigestPrimitive>::Digest as Digest>::OutputSize == <C as Curve>::FieldSize,
    <<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar as PrimeField>::Repr == GenericArray<u8, <C as Curve>::FieldSize>, 
[src]

Loading content...

Implementors

impl Verifier<Signature> for Keypair[src]

pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>[src]

Verify a signature on a message with this keypair’s public key.

impl Verifier<Signature> for PublicKey[src]

pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>[src]

Verify a signature on a message with this keypair’s public key.

Return

Returns Ok(()) if the signature is valid, and Err otherwise.

Loading content...