Set a digest algorithm on a key context by name for the given operation.
Declared in <openssl/evp.h>
int
EVP_PKEY_CTX_md(
EVP_PKEY_CTX* ctx,
int optype,
int cmd,
char const* md);
Positive value on success, or a non-positive value on failure.
| Name | Description |
|---|---|
| ctx | Key context to update. |
| optype | Operation type such as EVP_PKEY_OP_TYPE_SIG. |
| cmd | Control command that expects an EVP_MD (for example EVP_PKEY_CTRL_MD). |
| md | Digest name such as "SHA256". |