1ZMQ_CURVE_KEYPAIR(3) 0MQ Manual ZMQ_CURVE_KEYPAIR(3)
2
3
4
6 zmq_curve_keypair - generate a new CURVE keypair
7
9 int zmq_curve_keypair (char *z85_public_key, char *z85_secret_key);
10
12 The zmq_curve_keypair() function shall return a newly generated random
13 keypair consisting of a public key and a secret key. The caller
14 provides two buffers, each at least 41 octets large, in which this
15 method will store the keys. The keys are encoded using
16 zmq_z85_encode(3).
17
19 The zmq_curve_keypair() function shall return 0 if successful, else it
20 shall return -1 and set errno to one of the values defined below.
21
23 ENOTSUP
24 The libzmq library was not built with cryptographic support
25 (libsodium).
26
28 Generating a new CURVE keypair.
29
30 char public_key [41];
31 char secret_key [41];
32 int rc = zmq_curve_keypair (public_key, secret_key);
33 assert (rc == 0);
34
35
37 zmq_z85_decode(3) zmq_z85_encode(3) zmq_curve(7)
38
40 This page was written by the 0MQ community. To make a change please
41 read the 0MQ Contribution Policy at
42 http://www.zeromq.org/docs:contributing.
43
44
45
460MQ 4.3.4 07/23/2022 ZMQ_CURVE_KEYPAIR(3)