libressl-DSA_size3
Get dsa signature or key size
Usage
Crypto Library (libcrypto, -lcrypto)
#include <openssl/dsa.h>
int
DSA_size(const DSA *dsa);
int
DSA_bits(const DSA *dsa);
Overview
DSA_size() returns the maximum size of an ASN.1 encoded DSA signature for the key dsa in bytes. It can be used to determine how much memory must be allocated for a DSA signature.
dsa->q must not be NULL.
DSA_bits() returns the number of significant bits in the public domain parameter p contained in dsa. This is also the number of bits in the public key.
Return values
DSA_size() returns the size of the signature in bytes.
DSA_bits() returns the size of the public key in bits.