Generate a random key suitable for the cipher currently set on ctx.
Declared in <openssl/evp.h>
int
EVP_CIPHER_CTX_rand_key(
EVP_CIPHER_CTX* ctx,
unsigned char* key);
1 on success, or 0 on failure.
| 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). |