Skip to main content

verify

Function verify 

Source
pub fn verify<R>(
    pk: &PublicKeyBox<'_>,
    signature_box: &SignatureBox<'_>,
    data_reader: R,
) -> Result<bool>
where R: Read,
Expand description

Verify a minisign signature

§Arguments

  • pk - The public key to verify the signature
  • signature_box - The signature to verify
  • data_reader - The data to verify

§Returns

A Result containing a boolean, true if the signature is valid

§Errors

  • ErrorKind::Io - If there is an error reading the data
  • ErrorKind::PublicKey - If the public key is invalid or not matching the signature
  • ErrorKind::PrehashedMismatch - If the signature is not prehashed