EC_KEY_priv2oct

Encodes a EC_KEY private key to an octet string

Synopsis

Declared in <openssl/ec.h>

[[deprecated]]
size_t
EC_KEY_priv2oct(
    EC_KEY const* key,
    unsigned char* buf,
    size_t len);

WARNING

Deprecated. Use of this entity is allowed but discouraged.

Return Value

the length of the encoded octet string or 0 if an error occurred

Parameters

NameDescription
keykey to encode
bufmemory buffer for the result. If NULL the function returns required buffer size.
lenlength of the memory buffer