[#HMAC_Init]
= HMAC&lowbar;Init
:mrdocs:

Initialize an HMAC context with a key and digest (legacy)&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(
    xref:HMAC_CTX.adoc[HMAC&lowbar;CTX]* ctx,
    void const* key,
    int len,
    xref:EVP_MD.adoc[EVP&lowbar;MD] const* md);
----

[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 error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| HMAC context to initialize&period;
| *key*
| HMAC key material&period;
| *len*
| Length of `key` in bytes&period;
| *md*
| Message digest to use, or NULL to keep the current digest&period;
|===


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