pub struct MdCtx(_);

Implementations

Creates a new context.

This corresponds to EVP_MD_CTX_new.

Methods from Deref<Target = MdCtxRef>

Initializes the context to compute the digest of data.

This corresponds to EVP_DigestInit_ex.

Initializes the context to compute the signature of data.

A reference to the context’s inner PkeyCtx is returned, allowing signature settings to be configured.

This corresponds to EVP_DigestSignInit.

Initializes the context to verify the signature of data.

A reference to the context’s inner PkeyCtx is returned, allowing signature settings to be configured.

This corresponds to EVP_DigestVerifyInit.

Updates the context with more data.

This corresponds to EVP_DigestUpdate.

Updates the context with more data.

This corresponds to EVP_DigestSignUpdate.

Updates the context with more data.

This corresponds to EVP_DigestVerifyUpdate.

Copies the computed digest into the buffer, returning the number of bytes written.

This corresponds to EVP_DigestFinal.

Copies the computed digest into the buffer.

Requires OpenSSL 1.1.1 or newer.

This corresponds to EVP_DigestFinalXOF.

Signs the computed digest.

If out is set to None, an upper bound on the number of bytes required for the output buffer will be returned.

This corresponds to EVP_DigestSignFinal.

Like Self::digest_sign_final but appends the signature to a Vec.

Verifies the provided signature.

Returns Ok(true) if the signature is valid, Ok(false) if the signature is invalid, and Err if an error occurred.

This corresponds to EVP_DigestVerifyFinal.

Computes the signature of the data in from.

If to is set to None, an upper bound on the number of bytes required for the output buffer will be returned.

Requires OpenSSL 1.1.1 or newer.

This corresponds to EVP_DigestSign.

Like Self::digest_sign but appends the signature to a Vec.

Verifies the signature of the data in data.

Returns Ok(true) if the signature is valid, Ok(false) if the signature is invalid, and Err if an error occurred.

Requires OpenSSL 1.1.1 or newer.

This corresponds to EVP_DigestVerify.

Returns the size of the message digest, i.e. the size of the hash

This corresponds to EVP_MD_CTX_size.

Resets the underlying EVP_MD_CTX instance

This corresponds to EVP_MD_CTX_reset.

Trait Implementations

Converts this type into a shared reference of the (usually inferred) input type.
Immutably borrows from an owned value. Read more
The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.
Executes the destructor for this type. Read more
The raw C type.
The type representing a reference to this type.
Constructs an instance of this type from its raw type.
Returns a raw pointer to the wrapped value.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.