ZeroMQ介面函式之 :zmq_curve_keypair
zmq_curve_keypair(3) ØMQ Manual - ØMQ/4.1.0
Name
zmq_curve_keypair - 生成一個新的CURVE 金鑰對
Synopsis
int zmq_curve_keypair (char *z85_public_key, char *z85_secret_key);
Description
函式zmq_curve_keypair()會返回一個隨機生成的金鑰對,包括一個公鑰和一個金鑰。呼叫者提供兩個儲存空間,每個長度至少是8 bit * 41大,用來儲存生成的金鑰對。這兩個金鑰都是經過zmq_z85_encode(3)
Return value
函式zmq_curve_keypair()執行成功會返回0,否則會返回 -1,並且設定errno為下列值。
Errors
ENOTSUP
此版本的ZMQ連結庫libzmq 不支援加密(libsodium)。
Example
建立一對新的curve金鑰對
char public_key [41];
char secret_key [41];
int rc = crypto_box_keypair (public_key, secret_key); assert (rc == 0);
See also
zmq_z85_decode(3) zmq_z85_encode(3) zmq_curve(7)
Authors
This page was written by the ØMQ community. To make a change please read the ØMQ Contribution Policy at http://www.zeromq.org/docs:contributing.
Web site design and content is copyright (c) 2007-2012 iMatix Corporation. Contact us for professional support. Site content licensed under the Creative Commons Attribution-Share Alike 3.0 License. ØMQ is copyright (c) Copyright (c) 2007-2012 iMatix Corporation and Contributors. ØMQ is free software licensed under the LGPL. ØMQ, ZeroMQ, and 0MQ are trademarks of iMatix Corporation. Terms of Use — Privacy
Policy
翻譯:風波
mail : [email protected]