[#EVP_CIPHER_CTX_rand_key] = EVP_CIPHER_CTX_rand_key :mrdocs: Generate a random key suitable for the cipher currently set on `ctx.` == Synopsis Declared in `<openssl/evp.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int EVP_CIPHER_CTX_rand_key( xref:EVP_CIPHER_CTX.adoc[EVP_CIPHER_CTX]* ctx, unsigned char* key); ---- == Return Value 1 on success, or 0 on failure. == Parameters [cols="1,4"] |=== | Name| Description | *ctx* | Cipher context whose algorithm determines the key length. | *key* | Buffer receiving the generated key (at least EVP_CIPHER_CTX_get_key_length() bytes). |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#