[#EVP_PKEY_CTX_set_scrypt_maxmem_bytes]
= EVP&lowbar;PKEY&lowbar;CTX&lowbar;set&lowbar;scrypt&lowbar;maxmem&lowbar;bytes
:mrdocs:

Cap the memory scrypt may use during key derivation&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;PKEY&lowbar;CTX&lowbar;set&lowbar;scrypt&lowbar;maxmem&lowbar;bytes(
    xref:EVP_PKEY_CTX.adoc[EVP&lowbar;PKEY&lowbar;CTX]* ctx,
    uint64&lowbar;t maxmem&lowbar;bytes);
----

== Return Value

1 on success, or a negative value on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Context configured for the scrypt KDF&period;
| *maxmem&lowbar;bytes*
| Maximum bytes of RAM the derivation may consume&period;
|===


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