[−][src]Struct yaca::VerifyContext
Context for Verify
operations
Implementations
impl VerifyContext
[src]
pub fn initialize(
algo: &DigestAlgorithm,
pub_key: &Key
) -> Result<VerifyContext>
[src]
algo: &DigestAlgorithm,
pub_key: &Key
) -> Result<VerifyContext>
Initializes a signature verification context for asymmetric signatures
algo
is a digest algorithm used to calculate the signaturepub_key
is a matching public key to the one used to calculate the signature, algorithm is deduced based on key type, supported key types:- For RSA operations the default padding used
is
Padding::Pkcs1
. It can be changed usingCtxPad::set_property_padding()
. For verify to succeed it has to be set to the same value it was signed with.
pub fn update(&self, message: &[u8]) -> Result<()>
[src]
Feeds the message into the digital signature verification algorithm
message
is a chunk of data used to calculate the signature from.
pub fn finalize(&self, signature: &[u8]) -> Result<bool>
[src]
Performs the verification
signature
is a message signature to be verified.- Returns
true
in case of a successful verification,false
otherwise.
Trait Implementations
impl ContextWithPadding for VerifyContext
[src]
pub fn set_property_padding(&self, padding: &Padding) -> Result<()>
[src]
impl Drop for VerifyContext
[src]
Auto Trait Implementations
impl RefUnwindSafe for VerifyContext
impl !Send for VerifyContext
impl !Sync for VerifyContext
impl Unpin for VerifyContext
impl UnwindSafe for VerifyContext
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,