Decode a hex string to bytes and pass them to EVP_PKEY_CTX_ctrl as the p2 buffer.

Synopsis

Declared in <openssl/evp.h>

int
EVP_PKEY_CTX_hex2ctrl(
    EVP_PKEY_CTX* ctx,
    int cmd,
    char const* hex);

Return Value

Positive on success, 0 or negative on failure (same convention as EVP_PKEY_CTX_ctrl).

Parameters

Name

Description

ctx

Key context that receives the control.

cmd

Control command number understood by the key method.

hex

NUL‐terminated hexadecimal encoding of the binary value.

Created with MrDocs