[#HMAC_Init_ex]
= HMAC&lowbar;Init&lowbar;ex
:mrdocs:

(Re)initialize an HMAC&lowbar;CTX with key and digest (deprecated&semi; prefer EVP&lowbar;MAC)&period;

== Synopsis

Declared in `&lt;openssl&sol;hmac&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;deprecated&rsqb;&rsqb;
int
HMAC&lowbar;Init&lowbar;ex(
    xref:HMAC_CTX.adoc[HMAC&lowbar;CTX]* ctx,
    void const* key,
    int len,
    xref:EVP_MD.adoc[EVP&lowbar;MD] const* md,
    xref:ENGINE.adoc[ENGINE]* impl);
----

[WARNING]
====
https://en.cppreference.com/cpp/language/attributes/deprecated[Deprecated^]. Use of this entity is allowed but discouraged.
====
== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| HMAC context to initialize&period;
| *key*
| HMAC key bytes, or NULL to reuse the previous key when only `md` changes&period;
| *len*
| Length of `key` in bytes (ignored when `key` is NULL)&period;
| *md*
| Message digest used as the HMAC hash, or NULL to keep the previous digest&period;
| *impl*
| Optional ENGINE implementing `md,` or NULL&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
