OSSL_CRMF_pbm_new

Compute a Password-Based MAC (PBM) for CRMF POPO using the given parameters, message, and secret.

Synopsis

Declared in <openssl/crmf.h>

int
OSSL_CRMF_pbm_new(
    OSSL_LIB_CTX* libctx,
    char const* propq,
    OSSL_CRMF_PBMPARAMETER const* pbmp,
    unsigned char const* msg,
    size_t msglen,
    unsigned char const* sec,
    size_t seclen,
    unsigned char** mac,
    size_t* maclen);

Return Value

1 on success, or 0 on error.

Parameters

NameDescription
libctxLibrary context for algorithm fetching, or NULL for the default.
propqProperty query for the MAC algorithm, or NULL.
pbmpPBMParameter describing salt, OWF, iteration count, and MAC.
msgMessage octets to authenticate.
msglenLength of msg in bytes.
secShared secret / password octets.
seclenLength of sec in bytes.
macOn success, receives a newly allocated MAC buffer (caller frees with OPENSSL_free()).
maclenOptional; on success receives the MAC length in bytes when non-NULL.