zmq_curve_keypair.txt 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. zmq_curve_keypair(3)
  2. ====================
  3. NAME
  4. ----
  5. zmq_curve_keypair - generate a new CURVE keypair
  6. SYNOPSIS
  7. --------
  8. *int zmq_curve_keypair (char *z85_public_key, char *z85_secret_key);*
  9. DESCRIPTION
  10. -----------
  11. The _zmq_curve_keypair()_ function shall return a newly generated random
  12. keypair consisting of a public key and a secret key. The caller provides
  13. two buffers, each at least 41 octets large, in which this method will
  14. store the keys. The keys are encoded using linkzmq:zmq_z85_encode[3].
  15. RETURN VALUE
  16. ------------
  17. The _zmq_curve_keypair()_ function shall return 0 if successful, else it
  18. shall return `-1` and set 'errno' to one of the values defined below.
  19. ERRORS
  20. ------
  21. *ENOTSUP*::
  22. The libzmq library was not built with cryptographic support (libsodium).
  23. EXAMPLE
  24. -------
  25. .Generating a new CURVE keypair
  26. ----
  27. char public_key [41];
  28. char secret_key [41];
  29. int rc = zmq_curve_keypair (public_key, secret_key);
  30. assert (rc == 0);
  31. ----
  32. SEE ALSO
  33. --------
  34. linkzmq:zmq_z85_decode[3]
  35. linkzmq:zmq_z85_encode[3]
  36. linkzmq:zmq_curve[7]
  37. AUTHORS
  38. -------
  39. This page was written by the 0MQ community. To make a change please
  40. read the 0MQ Contribution Policy at <http://www.zeromq.org/docs:contributing>.