summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/DH_size.3
blob: 3675f7b12bdbe771f621da708e16657066c98142 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.Dd $Mdocdate: November 2 2016 $
.Dt DH_SIZE 3
.Os
.Sh NAME
.Nm DH_size
.Nd get Diffie-Hellman prime size
.Sh SYNOPSIS
.In openssl/dh.h
.Ft int
.Fo DH_size
.Fa "DH *dh"
.Fc
.Sh DESCRIPTION
This function returns the Diffie-Hellman size in bytes.
It can be used to determine how much memory must be allocated for the
shared secret computed by
.Xr DH_compute_key 3 .
.Pp
.Fa dh->p
must not be
.Dv NULL .
.Sh RETURN VALUE
The size in bytes.
.Sh SEE ALSO
.Xr dh 3 ,
.Xr DH_generate_key 3
.Sh HISTORY
.Fn DH_size
is available in all versions of SSLeay and OpenSSL.