Sortix cross-nightly manual
This manual documents Sortix cross-nightly. You can instead view this document in the latest official manual.
NAME
EVP_MD_nid, EVP_MD_type, EVP_MD_CTX_type, EVP_MD_name, EVP_MD_size, EVP_MD_CTX_size, EVP_MD_block_size, EVP_MD_CTX_block_size, EVP_MD_flags, EVP_MD_pkey_type — inspect EVP_MD objectsSYNOPSIS
#include <openssl/evp.h>EVP_MD_nid(const EVP_MD *md);
EVP_MD_type(const EVP_MD *md);
EVP_MD_CTX_type(const EVP_MD_CTX *ctx);
EVP_MD_name(const EVP_MD *md);
EVP_MD_size(const EVP_MD *md);
EVP_MD_CTX_size(const EVP_MD_CTX *ctx);
EVP_MD_block_size(const EVP_MD *md);
EVP_MD_CTX_block_size(const EVP_MD_CTX *ctx);
EVP_MD_flags(const EVP_MD *md);
EVP_MD_pkey_type(const EVP_MD *md);
DESCRIPTION
EVP_MD_nid() and EVP_MD_type() are identical and return the numerical identifier (NID) of md. The NID is an internal value which may or may not have a corresponding ASN.1 OBJECT IDENTIFIER; see OBJ_nid2obj(3) for details. For example , EVP_MD_type(EVP_sha512()) returns NID_sha512. EVP_MD_CTX_type() returns the NID of the message digest algorithm that ctx is configured to use. These functions are normally used when setting ASN.1 OIDs.- EVP_MD_FLAG_DIGALGID_NULL
- The parameters in a DigestAlgorithmIdentifier are encoded using an explicit ASN.1 NULL rather than omitting them. This is the default, which means that it takes effect for EVP_MD objects that do not have EVP_MD_FLAG_DIGALGID_ABSENT set.
- EVP_MD_FLAG_DIGALGID_ABSENT
- The parameters in a DigestAlgorithmIdentifier are omitted from the ASN.1 encoding. This is used by the EVP_MD objects documented in the manual page EVP_sha3_224(3) and by the objects returned from EVP_sha512(3), EVP_sha512_256(3), EVP_sha512_224(3), EVP_sha384(3), EVP_sha256(3), EVP_sha224(3), EVP_sha1(3), and EVP_sm3(3).
- EVP_MD_FLAG_DIGALGID_CUSTOM
- This flag is reserved for user-defined EVP_MD objects supporting custom DigestAlgorithmIdentifier handling via EVP_MD_CTX_ctrl(3), but actually, it is ignored by both LibreSSL and OpenSSL and such user-defined behaviour is not supported by the libraries.
- EVP_MD_FLAG_FIPS
- Mark the digest method as suitable for FIPS mode. This flag is ignored by both LibreSSL and OpenSSL.
- EVP_MD_FLAG_ONESHOT
- Intended to indicate that the digest method can only handle one block of input, but actually, this flag is ignored by both LibreSSL and OpenSSL.
RETURN VALUES
EVP_MD_nid(), EVP_MD_type(), EVP_MD_CTX_type(), and EVP_MD_pkey_type() return the NID of the corresponding OBJECT IDENTIFIER or NID_undef if none exists.STANDARDS
RFC 5754: Using SHA2 Algorithms with Cryptographic Message Syntax- section 2: Message Digest Algorithms