[#OSSL_HPKE_get_grease_value]
= OSSL&lowbar;HPKE&lowbar;get&lowbar;grease&lowbar;value
:mrdocs:

Produce GREASE&hyphen;like random encap and ciphertext buffers sized for an HPKE suite&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
OSSL&lowbar;HPKE&lowbar;get&lowbar;grease&lowbar;value(
    OSSL&lowbar;HPKE&lowbar;SUITE const* suite&lowbar;in,
    OSSL&lowbar;HPKE&lowbar;SUITE* suite,
    unsigned char* enc,
    size&lowbar;t* enclen,
    unsigned char* ct,
    size&lowbar;t ctlen,
    xref:OSSL_LIB_CTX.adoc[OSSL&lowbar;LIB&lowbar;CTX]* libctx,
    char const* propq);
----

== Return Value

1 on success, or 0 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *suite&lowbar;in*
| Preferred suite for sizing, or NULL to pick a random supported suite&period;
| *suite*
| Optional output receiving the suite actually used for sizing&period;
| *enc*
| Destination for a random encapsulated&hyphen;key&hyphen;sized buffer&period;
| *enclen*
| In&sol;out length of `enc&period;`
| *ct*
| Destination for a random ciphertext&hyphen;sized buffer of length `ctlen&period;`
| *ctlen*
| Desired ciphertext buffer length (and plaintext&hyphen;equivalent sizing input)&period;
| *libctx*
| Library context, or NULL for the default&period;
| *propq*
| Optional property query string, or NULL&period;
|===


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