encryption TODO v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Mon, 02 May 2022 17:59:10 +0200
branchv_0
changeset 2 f724d805c34a
parent 1 27c11cea34de
child 3 3891db9e45b7
encryption TODO
src/ZeroMQCommand.cpp
--- a/src/ZeroMQCommand.cpp	Sun May 01 22:27:32 2022 +0200
+++ b/src/ZeroMQCommand.cpp	Mon May 02 17:59:10 2022 +0200
@@ -49,6 +49,16 @@
 	zmq::socket_t zmqSocket(zmqContext, zmq::socket_type::pull);
 	zmqSocket.bind(convertor.to_bytes(configuration.endpointUrl));
 
+
+	if (false) {
+		// TODO: optionally generate and print keys and/or do encryption
+		char server_public_key[41];
+		char server_secret_key[41];
+		zmq_curve_keypair(server_public_key, server_secret_key);
+		std::cerr << "Server public key: " << std::string(server_public_key) << std::endl;
+		std::cerr << "Server secret key: " << std::string(server_secret_key) << std::endl;
+	}
+
 	writer->startRelation(configuration.relation,{
 		{L"text", TypeId::STRING},
 		{L"data", TypeId::STRING}