Overte C++ Documentation
RSAKeypairGenerator.h
1 //
2 // RSAKeypairGenerator.h
3 // libraries/networking/src
4 //
5 // Created by Stephen Birarda on 2014-10-14.
6 // Copyright 2014 High Fidelity, Inc.
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 
12 #ifndef hifi_RSAKeypairGenerator_h
13 #define hifi_RSAKeypairGenerator_h
14 
15 #include <QtCore/QObject>
16 #include <QtCore/QRunnable>
17 #include <QtCore/QUuid>
18 
19 class RSAKeypairGenerator : public QObject, public QRunnable {
20  Q_OBJECT
21 public:
22  RSAKeypairGenerator(QObject* parent = nullptr);
23 
24  virtual void run() override;
25  void generateKeypair();
26 
27 signals:
28  void errorGeneratingKeypair();
29  void generatedKeypair(QByteArray publicKey, QByteArray privateKey);
30 
31 private:
32  QUuid _domainID;
33  QByteArray _publicKey;
34  QByteArray _privateKey;
35 };
36 
37 #endif // hifi_RSAKeypairGenerator_h